public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAP: Make sure all resources used by the gpio-switch IRQ handler are initialized before use.
@ 2009-04-17  9:39 Peter 'p2' De Schrijver
  2009-05-14 16:59 ` [APPLIED] [PATCH] OMAP: Make sure all resources used by the gpio-switch IRQ Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: Peter 'p2' De Schrijver @ 2009-04-17  9:39 UTC (permalink / raw)
  To: linux-omap; +Cc: Peter 'p2' De Schrijver

Initialize the workqueue and timer used by the gpio-switch IRQ handler before
we register the IRQ handler itself.

Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
---
 arch/arm/plat-omap/gpio-switch.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/arm/plat-omap/gpio-switch.c b/arch/arm/plat-omap/gpio-switch.c
index e9041af..d88b6de 100644
--- a/arch/arm/plat-omap/gpio-switch.c
+++ b/arch/arm/plat-omap/gpio-switch.c
@@ -318,6 +318,13 @@ static int __init new_switch(struct gpio_switch *sw)
 		else
 			trigger = IRQF_TRIGGER_RISING;
 	}
+
+	INIT_WORK(&sw->work, gpio_sw_handler);
+	init_timer(&sw->timer);
+
+	sw->timer.function = gpio_sw_timer;
+	sw->timer.data = (unsigned long)sw;
+
 	r = request_irq(gpio_to_irq(sw->gpio), gpio_sw_irq_handler,
 			IRQF_SHARED | trigger, sw->name, sw);
 	if (r < 0) {
@@ -328,12 +335,6 @@ static int __init new_switch(struct gpio_switch *sw)
 		return r;
 	}
 
-	INIT_WORK(&sw->work, gpio_sw_handler);
-	init_timer(&sw->timer);
-
-	sw->timer.function = gpio_sw_timer;
-	sw->timer.data = (unsigned long)sw;
-
 	list_add(&sw->node, &gpio_switches);
 
 	return 0;
-- 
1.5.6.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [APPLIED] [PATCH] OMAP: Make sure all resources used by the gpio-switch IRQ
  2009-04-17  9:39 [PATCH] OMAP: Make sure all resources used by the gpio-switch IRQ handler are initialized before use Peter 'p2' De Schrijver
@ 2009-05-14 16:59 ` Tony Lindgren
  0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2009-05-14 16:59 UTC (permalink / raw)
  To: linux-omap

This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Initial commit ID (Likely to change): 3aff56edc2000488d749aca622c667533c28ae0f

PatchWorks
http://patchwork.kernel.org/patch/18660/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=3aff56edc2000488d749aca622c667533c28ae0f



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-05-14 16:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-17  9:39 [PATCH] OMAP: Make sure all resources used by the gpio-switch IRQ handler are initialized before use Peter 'p2' De Schrijver
2009-05-14 16:59 ` [APPLIED] [PATCH] OMAP: Make sure all resources used by the gpio-switch IRQ Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox