Skip to contentSkip to conversation

mfd: Don't use NO_IRQ in WM8350

PATCH Applied Mark Brown 2 participants 4 messages Oct 15, 2008

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 mfd: Don't use NO_IRQ in WM8350

NO_IRQ is only defined on some architectures - the general way to test for an invalid IRQ in the modern kernel is by comparing with zero.

---

This is a build fix for platforms that don't define NO_IRQ (which is most of them). Please merge as soon as possible.

 drivers/mfd/wm8350-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mfd/wm8350-core.c +1 -1
index 25a7a5d..bf87f67 100644
@@ -1217,7 +1217,7 @@ int wm8350_device_init(struct wm8350 *wm8350, int irq,
 
 	mutex_init(&wm8350->irq_mutex);
 	INIT_WORK(&wm8350->irq_work, wm8350_irq_worker);
-	if (irq != NO_IRQ) {
+	if (irq) {
 		ret = request_irq(irq, wm8350_irq, 0,
 				  "wm8350", wm8350);
 		if (ret != 0) {
Signature · 1 line
1.5.6.5
Applied
#1 lore raw
Quoted 5 lines · Mark Brown

NO_IRQ is only defined on some architectures - the general way to test for an invalid IRQ in the modern kernel is by comparing with zero.

Applied, thanks.
I'll send a pull request to Linus soon.

Cheers,
Samuel.

Quoted 23 lines

---

This is a build fix for platforms that don't define NO_IRQ (which is most of them). Please merge as soon as possible.

 drivers/mfd/wm8350-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mfd/wm8350-core.c +1 -1
index 25a7a5d..bf87f67 100644
@@ -1217,7 +1217,7 @@ int wm8350_device_init(struct wm8350 *wm8350, int
 irq,
 
 	mutex_init(&wm8350->irq_mutex);
 	INIT_WORK(&wm8350->irq_work, wm8350_irq_worker);
-	if (irq != NO_IRQ) {
+	if (irq) {
 		ret = request_irq(irq, wm8350_irq, 0,
 				  "wm8350", wm8350);

if (ret != 0) {

author
#2 lore raw
Quoted 1 line · Samuel Ortiz

I'll send a pull request to Linus soon.

Thanks, it's fairly urgent since it breaks allmodconfig and allyesconfig on at least x86_64.

#3 lore raw
Quoted 6 lines · Mark Brown
Quoted 1 line · Samuel Ortiz

I'll send a pull request to Linus soon.

Thanks, it's fairly urgent since it breaks allmodconfig and allyesconfig on at least x86_64.

My patch queue is ready. I'll wait for a linux-next iteration, and send the pull request. That will happen tomorrow morning.

Cheers,
Samuel.