serial: RS485 ioctl structure uses __u32 include linux/types.h

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, January 2, 2009 - 1:01 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=60c20f...
Commit:     60c20fb8c00a2b23308ae4517f145383bc66d291
Parent:     6b447f04a9aecdf2a30c1a97e4b034ac7931bb70
Author:     Andy Whitcroft <apw@canonical.com>
AuthorDate: Fri Jan 2 13:49:04 2009 +0000
Committer:  Linus Torvalds <torvalds@linux-foundation.org>
CommitDate: Fri Jan 2 10:19:42 2009 -0800

    serial: RS485 ioctl structure uses __u32 include linux/types.h
    
    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>
    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>
---
 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>
 
 /*
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
serial: RS485 ioctl structure uses __u32 include linux/types.h, Linux Kernel Mailing ..., (Fri Jan 2, 1:01 pm)