Skip to contentSkip to conversation

cbus: tahvo: Fix build breakage caused by deprecated initializer removal

PATCH In review Jarkko Nikula 2 participants 5 messages Apr 18, 2011 – Apr 19, 2011

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 cbus: tahvo: Fix build breakage caused by deprecated initializer removal

Use DEFINE_SPINLOCK() for static spinlock initialization as the commit d04fa5a "locking: Remove deprecated lock initializers" removes the deprecated SPIN_LOCK_UNLOCKED. Since tahvo_lock is not used elsewhere than tahvo.c it can be removed from tahvo.h too.

---
 drivers/cbus/tahvo.c |    2 +-
 drivers/cbus/tahvo.h |    2 --
 2 files changed, 1 insertions(+), 3 deletions(-)
drivers/cbus/tahvo.c +1 -1
index 8e2e669..45318d9 100644
@@ -53,7 +53,7 @@ static int tahvo_initialized;
 static int tahvo_is_betty;
 
 static struct tasklet_struct tahvo_tasklet;
-spinlock_t tahvo_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(tahvo_lock);
 
 struct tahvo_irq_handler_desc {
 	int (*func)(unsigned long);
drivers/cbus/tahvo.h +0 -2
index 6cb6600..e5ed990 100644
@@ -63,6 +63,4 @@ int tahvo_get_backlight_level(void);
 int tahvo_get_max_backlight_level(void);
 void tahvo_set_backlight_level(int level);
 
-extern spinlock_t tahvo_lock;
-
 #endif /* __DRIVERS_CBUS_TAHVO_H */
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 2/3 cbus: retu: Fix build breakage caused by recent genirq commits

Convert retu.c to use updated irq function names after the genirq cleanup commits 0c6f8a8 "genirq: Remove compat code" and
a0cd9ca "genirq: Namespace cleanup".

---
 drivers/cbus/retu.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
drivers/cbus/retu.c +6 -6
index f271e57..ec108f3 100644
@@ -298,10 +298,10 @@ static void retu_irq_init(struct retu *retu)
 	int			irq;
 
 	for (irq = base; irq < end; irq++) {
-		set_irq_chip_data(irq, retu);
-		set_irq_chip_and_handler(irq, &retu_irq_chip,
+		irq_set_chip_data(irq, retu);
+		irq_set_chip_and_handler(irq, &retu_irq_chip,
 				handle_simple_irq);
-		set_irq_nested_thread(irq, 1);
+		irq_set_nested_thread(irq, 1);
 		retu_irq_setup(irq);
 	}
 }
@@ -316,8 +316,8 @@ static void retu_irq_exit(struct retu *retu)
 #ifdef CONFIG_ARM
 		set_irq_flags(irq, 0);
 #endif
-		set_irq_chip_and_handler(irq, NULL, NULL);
-		set_irq_chip_data(irq, NULL);
+		irq_set_chip_and_handler(irq, NULL, NULL);
+		irq_set_chip_data(irq, NULL);
 	}
 }
 
@@ -479,7 +479,7 @@ static int __init retu_probe(struct platform_device *pdev)
 		goto err1;
 	}
 
-	set_irq_wake(retu->irq, 1);
+	irq_set_irq_wake(retu->irq, 1);
 
 	/* Register power off function */
 	pm_power_off = retu_power_off;
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH 3/3 omap: Fix board-nokia770.c and board-n8x0 cbus build breakage

In reply to Jarkko Nikula

Fix a build breakage in CBUS initialization code in Nokia 770 and N8x0 boards that appeared after commit 0c6f8a8 "genirq: Remove compat code".

---
Build breakage that is only in linux-omap-2.6/cbus branch.

---
 arch/arm/mach-omap1/board-nokia770.c |    2 +-
 arch/arm/mach-omap2/board-n8x0.c     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap1/board-nokia770.c +1 -1
index e2537b8..5d174a3 100644
@@ -177,7 +177,7 @@ static void __init nokia770_cbus_init(void)
 		return;
 	}
 
-	set_irq_type(gpio_to_irq(62), IRQ_TYPE_EDGE_RISING);
+	irq_set_irq_type(gpio_to_irq(62), IRQ_TYPE_EDGE_RISING);
 	retu_resource[0].start = gpio_to_irq(62);
 	platform_device_register(&retu_device);
 
arch/arm/mach-omap2/board-n8x0.c +1 -1
index bd7937a..9ae6dff 100644
@@ -274,7 +274,7 @@ static void __init n8x0_cbus_init(void)
 		return;
 	}
 
-	set_irq_type(gpio_to_irq(108), IRQ_TYPE_EDGE_RISING);
+	irq_set_irq_type(gpio_to_irq(108), IRQ_TYPE_EDGE_RISING);
 	retu_resource[0].start = gpio_to_irq(108);
 	platform_device_register(&retu_device);
 
Signature · 1 line
1.7.0.4
maintainer
#3 lore raw
In reply to Jarkko Nikula
Quoted 4 lines · Jarkko Nikula

Use DEFINE_SPINLOCK() for static spinlock initialization as the commit d04fa5a "locking: Remove deprecated lock initializers" removes the deprecated SPIN_LOCK_UNLOCKED. Since tahvo_lock is not used elsewhere than tahvo.c it can be removed from tahvo.h too.

Thanks pushed all three. Looks like TAHVO_USB still fails to compile as the otg_set_transceiver may not be compiled.

Tony

#4 lore raw
Quoted 9 lines · On Tue, 19 Apr 2011 00:07:24 -0700 Tony Lindgren <[email protected]> wrote:
Quoted 4 lines · Jarkko Nikula

Use DEFINE_SPINLOCK() for static spinlock initialization as the commit d04fa5a "locking: Remove deprecated lock initializers" removes the deprecated SPIN_LOCK_UNLOCKED. Since tahvo_lock is not used elsewhere than tahvo.c it can be removed from tahvo.h too.

Thanks pushed all three. Looks like TAHVO_USB still fails to compile as the otg_set_transceiver may not be compiled.

True, it fails if CONFIG_OTG_UTILS is not set and it was selected by musb in my config. I'll send a Kconfig fix for that.

Signature · 1 line
Jarkko