linux-2.6.28.2-fix-serial.h-include.patch 1.7 KB

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