Patchwork [v2] ARM: localtimer: add header linux/errno.h explicitly

mail settings
Submitter Shawn Guo
Date Oct. 2, 2011, 8:20 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/117282/
State New
Headers show


Shawn Guo - Oct. 2, 2011, 8:20 a.m.
Per the text in  Documentation/SubmitChecklist as below, we should
explicitly have header linux/errno.h in localtimer.h for ENXIO

1: If you use a facility then #include the file that defines/declares
   that facility.  Don't depend on other header files pulling in ones
   that you use.

Otherwise, we may run into some compiling error like the following one,
if any file includes localtimer.h without CONFIG_LOCAL_TIMERS defined.

  arch/arm/include/asm/localtimer.h: In function ‘local_timer_setup’:
  arch/arm/include/asm/localtimer.h:53:10: error: ‘ENXIO’ undeclared (first use in this function)

Signed-off-by: Shawn Guo <>
Changes since v1:
 * Move the include towards the top of the file

 arch/arm/include/asm/localtimer.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


diff --git a/arch/arm/include/asm/localtimer.h b/arch/arm/include/asm/localtimer.h
index 080d74f..ff66638 100644
--- a/arch/arm/include/asm/localtimer.h
+++ b/arch/arm/include/asm/localtimer.h
@@ -10,6 +10,8 @@ 
+#include <linux/errno.h>
 struct clock_event_device;