public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] serial: RS485 ioctl structure uses __u32 include linux/types.h
@ 2008-12-02 11:00 Andy Whitcroft
  2008-12-29 12:37 ` Mike Frysinger
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Whitcroft @ 2008-12-02 11:00 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-serial, linux-kernel, Andy Whitcroft

In the commit below a new struct serial_rs485 was introduced for a new
ioctl:

    commit c26c56c0f40e200e61d1390629c806f6adaffbcc
    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>
---
 include/linux/serial.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/include/linux/serial.h b/include/linux/serial.h
index 1ea8d92..9136cc5 100644
--- a/include/linux/serial.h
+++ b/include/linux/serial.h
@@ -10,8 +10,9 @@
 #ifndef _LINUX_SERIAL_H
 #define _LINUX_SERIAL_H
 
-#ifdef __KERNEL__
 #include <linux/types.h>
+
+#ifdef __KERNEL__
 #include <asm/page.h>
 
 /*
-- 
1.6.0.4.911.gc990

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] serial: RS485 ioctl structure uses __u32 include linux/types.h
  2008-12-02 11:00 [PATCH 1/1] serial: RS485 ioctl structure uses __u32 include linux/types.h Andy Whitcroft
@ 2008-12-29 12:37 ` Mike Frysinger
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2008-12-29 12:37 UTC (permalink / raw)
  To: Andy Whitcroft; +Cc: Alan Cox, linux-serial, linux-kernel

On Tue, Dec 2, 2008 at 06:00, Andy Whitcroft <apw@canonical.com> wrote:
> In the commit below a new struct serial_rs485 was introduced for a new
> ioctl:
>
>    commit c26c56c0f40e200e61d1390629c806f6adaffbcc
>    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:

looks like this was posted on Nov 3 already ...
http://lkml.org/lkml/2008/11/3/240
-mike

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-29 12:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-02 11:00 [PATCH 1/1] serial: RS485 ioctl structure uses __u32 include linux/types.h Andy Whitcroft
2008-12-29 12:37 ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox