Skip to content

Commit

Permalink
serial: RS485 ioctl structure uses __u32 include linux/types.h
Browse files Browse the repository at this point in the history
In the commit below a new struct serial_rs485 was introduced for a new
ioctl:

    commit c26c56c
    Author: Alan Cox <alan@redhat.com>
    Date:   Mon Oct 13 10:37:48 2008 +0100

	tty: Cris has a nice RS485 ioctl so we should steal it

This structure uses the __u32 types for some of its members, which leads
to the following compile error:

    $ cc -I.../include -c X.c
    In file included from X.c:2: .../include/linux/serial.h:185:
		error: expected specifier-qualifier-list before ‘__u32’
    $

It seems that these types are appropriate for this structure as it is
to be exposed to userspace.  These types are available via linux/types.h
so move the include of that outside the __KERNEL__ section.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Andy Whitcroft authored and Linus Torvalds committed Jan 2, 2009
1 parent 6b447f0 commit 60c20fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/linux/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
#ifndef _LINUX_SERIAL_H
#define _LINUX_SERIAL_H

#ifdef __KERNEL__
#include <linux/types.h>

#ifdef __KERNEL__
#include <asm/page.h>

/*
Expand Down

0 comments on commit 60c20fb

Please sign in to comment.