diff options
author | Chen Gang <gang.chen@asianux.com> | 2013-08-08 12:55:44 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2013-08-08 12:55:44 +1000 |
commit | 2a055d7702439ab666775f17c6d8aff8163951f7 (patch) | |
tree | e85e504d9c7519a9b49312fbce0a9af6621b1e37 | |
parent | d8aae920d174669955c4f3f1e8819abcf384db5d (diff) |
include/linux/interrupt.h: add dummy irq_set_irq_wake() for "!GENERIC_HARDIRQS"
Since irq_set_irq_wake() has already declared in header file, when
GENERIC_HARDIRQS enabled.
Recommend to define the dummy one for GENERIC_HARDIRQS disabled, and also
let the other related "static inline" functions are independent from
GENERIC_HARDIRQS.
So can avoid the compiling error below, and also let the code simpler
and clearer.
The related compiling error (ARCH=s390 allmodconfig):
sound/soc/codecs/wm0010.c: In function wm0010_spi_probe:
sound/soc/codecs/wm0010.c:976:2: error: implicit declaration of function irq_set_irq_wake [-Werror=implicit-function-declaration]
Signed-off-by: Chen Gang <gang.chen@asianux.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | include/linux/interrupt.h | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 5fa5afeeb759..1a311e08b5ef 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -344,16 +344,6 @@ static inline void enable_irq_lockdep_irqrestore(unsigned int irq, unsigned long /* IRQ wakeup (PM) control: */ extern int irq_set_irq_wake(unsigned int irq, unsigned int on); -static inline int enable_irq_wake(unsigned int irq) -{ - return irq_set_irq_wake(irq, 1); -} - -static inline int disable_irq_wake(unsigned int irq) -{ - return irq_set_irq_wake(irq, 0); -} - #else /* !CONFIG_GENERIC_HARDIRQS */ /* * NOTE: non-genirq architectures, if they want to support the lock @@ -370,16 +360,23 @@ static inline int disable_irq_wake(unsigned int irq) enable_irq(irq) # endif -static inline int enable_irq_wake(unsigned int irq) +/* IRQ wakeup (PM) control: */ +static inline int irq_set_irq_wake(unsigned int irq, unsigned int on) { return 0; } +#endif /* CONFIG_GENERIC_HARDIRQS */ + +static inline int enable_irq_wake(unsigned int irq) +{ + return irq_set_irq_wake(irq, 1); +} + static inline int disable_irq_wake(unsigned int irq) { - return 0; + return irq_set_irq_wake(irq, 0); } -#endif /* CONFIG_GENERIC_HARDIRQS */ #ifdef CONFIG_IRQ_FORCED_THREADING |