mfd: Update WM8350 drivers for changed interrupt numbers
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 6 Jan 2010 19:24:25 +0000 (19:24 +0000)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 7 Mar 2010 21:16:58 +0000 (22:16 +0100)
The headphone detect and charger are using the IRQ numbers so need
to take account of irq_base with the genirq conversion. I obviously
picked the wrong system for initial testing.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/power/wm8350_power.c
sound/soc/codecs/wm8350.c

index 3839a5e..0693902 100644 (file)
@@ -190,7 +190,7 @@ static irqreturn_t wm8350_charger_handler(int irq, void *data)
        struct wm8350_power *power = &wm8350->power;
        struct wm8350_charger_policy *policy = power->policy;
 
-       switch (irq) {
+       switch (irq - wm8350->irq_base) {
        case WM8350_IRQ_CHG_BAT_FAIL:
                dev_err(wm8350->dev, "battery failed\n");
                break;
index 079bf74..df2c6d9 100644 (file)
@@ -1349,7 +1349,7 @@ static irqreturn_t wm8350_hp_jack_handler(int irq, void *data)
        int mask;
        struct wm8350_jack_data *jack = NULL;
 
-       switch (irq) {
+       switch (irq - wm8350->irq_base) {
        case WM8350_IRQ_CODEC_JCK_DET_L:
                jack = &priv->hpl;
                mask = WM8350_JACK_L_LVL;
@@ -1424,7 +1424,7 @@ int wm8350_hp_jack_detect(struct snd_soc_codec *codec, enum wm8350_jack which,
        wm8350_set_bits(wm8350, WM8350_JACK_DETECT, ena);
 
        /* Sync status */
-       wm8350_hp_jack_handler(irq, priv);
+       wm8350_hp_jack_handler(irq + wm8350->irq_base, priv);
 
        return 0;
 }