mfd: Add a data argument to the WM8350 IRQ free function
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 5 Jan 2010 13:59:07 +0000 (13:59 +0000)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 7 Mar 2010 21:16:56 +0000 (22:16 +0100)
To better match genirq.

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

index 9025f29e2707403e5986ff2ee29a0f51f57eb811..655836bc69a09b0510295ebf1f2b3e76e165e41b 100644 (file)
@@ -451,7 +451,7 @@ int wm8350_register_irq(struct wm8350 *wm8350, int irq,
 }
 EXPORT_SYMBOL_GPL(wm8350_register_irq);
 
-int wm8350_free_irq(struct wm8350 *wm8350, int irq)
+int wm8350_free_irq(struct wm8350 *wm8350, int irq, void *data)
 {
        if (irq < 0 || irq >= WM8350_NUM_IRQ)
                return -EINVAL;
index ad4f071e12870a26cbf6d7fb9415590947ba1833..3839a5e1c4a7b079b5286aa3911266a658e62b24 100644 (file)
@@ -428,18 +428,18 @@ static void wm8350_init_charger(struct wm8350 *wm8350)
 
 static void free_charger_irq(struct wm8350 *wm8350)
 {
-       wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_HOT);
-       wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_COLD);
-       wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_FAIL);
-       wm8350_free_irq(wm8350, WM8350_IRQ_CHG_TO);
-       wm8350_free_irq(wm8350, WM8350_IRQ_CHG_END);
-       wm8350_free_irq(wm8350, WM8350_IRQ_CHG_START);
-       wm8350_free_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_3P9);
-       wm8350_free_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_3P1);
-       wm8350_free_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_2P85);
-       wm8350_free_irq(wm8350, WM8350_IRQ_EXT_USB_FB);
-       wm8350_free_irq(wm8350, WM8350_IRQ_EXT_WALL_FB);
-       wm8350_free_irq(wm8350, WM8350_IRQ_EXT_BAT_FB);
+       wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_HOT, wm8350);
+       wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_COLD, wm8350);
+       wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_FAIL, wm8350);
+       wm8350_free_irq(wm8350, WM8350_IRQ_CHG_TO, wm8350);
+       wm8350_free_irq(wm8350, WM8350_IRQ_CHG_END, wm8350);
+       wm8350_free_irq(wm8350, WM8350_IRQ_CHG_START, wm8350);
+       wm8350_free_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_3P9, wm8350);
+       wm8350_free_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_3P1, wm8350);
+       wm8350_free_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_2P85, wm8350);
+       wm8350_free_irq(wm8350, WM8350_IRQ_EXT_USB_FB, wm8350);
+       wm8350_free_irq(wm8350, WM8350_IRQ_EXT_WALL_FB, wm8350);
+       wm8350_free_irq(wm8350, WM8350_IRQ_EXT_BAT_FB, wm8350);
 }
 
 static __devinit int wm8350_power_probe(struct platform_device *pdev)
index 94227dd6ba7ba6448f04a901f2e02f9b5666eb97..723cd1fb4867191078e3488ce3ff8267c8ec8f63 100644 (file)
@@ -1453,7 +1453,7 @@ static int wm8350_regulator_remove(struct platform_device *pdev)
        struct regulator_dev *rdev = platform_get_drvdata(pdev);
        struct wm8350 *wm8350 = rdev_get_drvdata(rdev);
 
-       wm8350_free_irq(wm8350, wm8350_reg[pdev->id].irq);
+       wm8350_free_irq(wm8350, wm8350_reg[pdev->id].irq, rdev);
 
        regulator_unregister(rdev);
 
index f1e440521c541ad5fb98852987e27af75bc1600e..a5512f515998b255325bb913c713107e99fc24d4 100644 (file)
@@ -478,8 +478,8 @@ static int __devexit wm8350_rtc_remove(struct platform_device *pdev)
        struct wm8350 *wm8350 = platform_get_drvdata(pdev);
        struct wm8350_rtc *wm_rtc = &wm8350->rtc;
 
-       wm8350_free_irq(wm8350, WM8350_IRQ_RTC_SEC);
-       wm8350_free_irq(wm8350, WM8350_IRQ_RTC_ALM);
+       wm8350_free_irq(wm8350, WM8350_IRQ_RTC_SEC, wm8350);
+       wm8350_free_irq(wm8350, WM8350_IRQ_RTC_ALM, wm8350);
 
        rtc_device_unregister(wm_rtc->rtc);
 
index 43868899bf4915a56779089651c9532ac1ecf2ec..8883125ddea19995e0f1d37b5e968e364e94aba4 100644 (file)
@@ -680,7 +680,8 @@ int wm8350_block_write(struct wm8350 *wm8350, int reg, int size, u16 *src);
 int wm8350_register_irq(struct wm8350 *wm8350, int irq,
                        irq_handler_t handler, unsigned long flags,
                        const char *name, void *data);
-int wm8350_free_irq(struct wm8350 *wm8350, int irq);
+int wm8350_free_irq(struct wm8350 *wm8350, int irq, void *data);
+
 int wm8350_mask_irq(struct wm8350 *wm8350, int irq);
 int wm8350_unmask_irq(struct wm8350 *wm8350, int irq);
 int wm8350_irq_init(struct wm8350 *wm8350, int irq,
index 718ef912e758463f7a8761fde11f9b68ca76a743..079bf745bf055e32ba6582230e93f49f3d798555 100644 (file)
@@ -1521,8 +1521,8 @@ static int wm8350_remove(struct platform_device *pdev)
                          WM8350_JDL_ENA | WM8350_JDR_ENA);
        wm8350_clear_bits(wm8350, WM8350_POWER_MGMT_4, WM8350_TOCLK_ENA);
 
-       wm8350_free_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_L);
-       wm8350_free_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_R);
+       wm8350_free_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_L, priv);
+       wm8350_free_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_R, priv);
 
        priv->hpl.jack = NULL;
        priv->hpr.jack = NULL;