[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <51CCE57C.5000901@asianux.com>
Date: Fri, 28 Jun 2013 09:23:08 +0800
From: Chen Gang <gang.chen@...anux.com>
To: paul.mckenney@...aro.org, josh@...htriplett.org,
Ben Hutchings <bhutchings@...arflare.com>, decot@...glers.com
CC: Heiko Carstens <heiko.carstens@...ibm.com>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
linux390@...ibm.com, linux-s390@...r.kernel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Linux-Arch <linux-arch@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH] 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@...anux.com>
---
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 5fa5afe..1a311e0 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
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists