Ticket #2316: header-patch-2.6.28

File header-patch-2.6.28, 1.6 KB (added by ken@…, 16 years ago)

commit 60c20fb8c00a2b23308ae4517f145383bc66d291 from www.kernel.org/pub/linux/kernel/v2.6/snapshots/patch-2.6.28-git5.log

Line 
1commit 60c20fb8c00a2b23308ae4517f145383bc66d291
2Author: Andy Whitcroft <apw@canonical.com>
3Date: Fri Jan 2 13:49:04 2009 +0000
4
5 serial: RS485 ioctl structure uses __u32 include linux/types.h
6
7 In the commit below a new struct serial_rs485 was introduced for a new
8 ioctl:
9
10 commit c26c56c0f40e200e61d1390629c806f6adaffbcc
11 Author: Alan Cox <alan@redhat.com>
12 Date: Mon Oct 13 10:37:48 2008 +0100
13
14 tty: Cris has a nice RS485 ioctl so we should steal it
15
16 This structure uses the __u32 types for some of its members, which leads
17 to the following compile error:
18
19 $ cc -I.../include -c X.c
20 In file included from X.c:2: .../include/linux/serial.h:185:
21 error: expected specifier-qualifier-list before ‘__u32’
22 $
23
24 It seems that these types are appropriate for this structure as it is
25 to be exposed to userspace. These types are available via linux/types.h
26 so move the include of that outside the __KERNEL__ section.
27
28 Signed-off-by: Andy Whitcroft <apw@canonical.com>
29 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
30 Signed-off-by: Alan Cox <alan@redhat.com>
31 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
32
33include/linux/serial.h | 3 ++-
341 files changed, 2 insertions(+), 1 deletions(-)
35
36diff --git a/include/linux/serial.h b/include/linux/serial.h
37index 1ea8d92..9136cc5 100644
38--- a/include/linux/serial.h
39+++ b/include/linux/serial.h
40@@ -10,8 +10,9 @@
41 #ifndef _LINUX_SERIAL_H
42 #define _LINUX_SERIAL_H
43
44-#ifdef __KERNEL__
45 #include <linux/types.h>
46+
47+#ifdef __KERNEL__
48 #include <asm/page.h>
49
50 /*