]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: Convert soc-jack code to use request_any_context_irq()
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 3 Nov 2010 13:35:31 +0000 (09:35 -0400)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 3 Nov 2010 16:37:00 +0000 (12:37 -0400)
Allow the standard soc-jack GPIO based jack handling to handle the use of
GPIOs which may sleep (such as those on GPIO expanders) by converting the
code to use request_any_context_irq().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
sound/soc/soc-jack.c

index 8a0a9205b1e785bf92d6ddd773b0a70cc7cf568d..9f07551e155f3f1b868c89d9d562bf3fe56f2016 100644 (file)
@@ -263,11 +263,12 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
                INIT_DELAYED_WORK(&gpios[i].work, gpio_work);
                gpios[i].jack = jack;
 
-               ret = request_irq(gpio_to_irq(gpios[i].gpio),
-                               gpio_handler,
-                               IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
-                               jack->codec->dev->driver->name,
-                               &gpios[i]);
+               ret = request_any_context_irq(gpio_to_irq(gpios[i].gpio),
+                                             gpio_handler,
+                                             IRQF_TRIGGER_RISING |
+                                             IRQF_TRIGGER_FALLING,
+                                             jack->codec->dev->driver->name,
+                                             &gpios[i]);
                if (ret)
                        goto err;