mfd: Convert wm8350 IRQ handlers to irq_handler_t

This is done as simple code transformation, the semantics of the
IRQ API provided by the core are are still very different to those
of genirq (mainly with regard to masking).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
diff --git a/drivers/power/wm8350_power.c b/drivers/power/wm8350_power.c
index 28b0299..6e634cf 100644
--- a/drivers/power/wm8350_power.c
+++ b/drivers/power/wm8350_power.c
@@ -184,8 +184,9 @@
 
 static DEVICE_ATTR(charger_state, 0444, charger_state_show, NULL);
 
-static void wm8350_charger_handler(struct wm8350 *wm8350, int irq, void *data)
+static irqreturn_t wm8350_charger_handler(int irq, void *data)
 {
+	struct wm8350 *wm8350 = data;
 	struct wm8350_power *power = &wm8350->power;
 	struct wm8350_charger_policy *policy = power->policy;
 
@@ -238,6 +239,8 @@
 	default:
 		dev_err(wm8350->dev, "Unknown interrupt %d\n", irq);
 	}
+
+	return IRQ_HANDLED;
 }
 
 /*********************************************************************
@@ -387,45 +390,53 @@
 {
 	/* register our interest in charger events */
 	wm8350_register_irq(wm8350, WM8350_IRQ_CHG_BAT_HOT,
-			    wm8350_charger_handler, NULL);
+			    wm8350_charger_handler, 0, "Battery hot", wm8350);
 	wm8350_unmask_irq(wm8350, WM8350_IRQ_CHG_BAT_HOT);
 	wm8350_register_irq(wm8350, WM8350_IRQ_CHG_BAT_COLD,
-			    wm8350_charger_handler, NULL);
+			    wm8350_charger_handler, 0, "Battery cold", wm8350);
 	wm8350_unmask_irq(wm8350, WM8350_IRQ_CHG_BAT_COLD);
 	wm8350_register_irq(wm8350, WM8350_IRQ_CHG_BAT_FAIL,
-			    wm8350_charger_handler, NULL);
+			    wm8350_charger_handler, 0, "Battery fail", wm8350);
 	wm8350_unmask_irq(wm8350, WM8350_IRQ_CHG_BAT_FAIL);
 	wm8350_register_irq(wm8350, WM8350_IRQ_CHG_TO,
-			    wm8350_charger_handler, NULL);
+			    wm8350_charger_handler, 0,
+			    "Charger timeout", wm8350);
 	wm8350_unmask_irq(wm8350, WM8350_IRQ_CHG_TO);
 	wm8350_register_irq(wm8350, WM8350_IRQ_CHG_END,
-			    wm8350_charger_handler, NULL);
+			    wm8350_charger_handler, 0,
+			    "Charge end", wm8350);
 	wm8350_unmask_irq(wm8350, WM8350_IRQ_CHG_END);
 	wm8350_register_irq(wm8350, WM8350_IRQ_CHG_START,
-			    wm8350_charger_handler, NULL);
+			    wm8350_charger_handler, 0,
+			    "Charge start", wm8350);
 	wm8350_unmask_irq(wm8350, WM8350_IRQ_CHG_START);
 	wm8350_register_irq(wm8350, WM8350_IRQ_CHG_FAST_RDY,
-			    wm8350_charger_handler, NULL);
+			    wm8350_charger_handler, 0,
+			    "Fast charge ready", wm8350);
 	wm8350_unmask_irq(wm8350, WM8350_IRQ_CHG_FAST_RDY);
 	wm8350_register_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_3P9,
-			    wm8350_charger_handler, NULL);
+			    wm8350_charger_handler, 0,
+			    "Battery <3.9V", wm8350);
 	wm8350_unmask_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_3P9);
 	wm8350_register_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_3P1,
-			    wm8350_charger_handler, NULL);
+			    wm8350_charger_handler, 0,
+			    "Battery <3.1V", wm8350);
 	wm8350_unmask_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_3P1);
 	wm8350_register_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_2P85,
-			    wm8350_charger_handler, NULL);
+			    wm8350_charger_handler, 0,
+			    "Battery <2.85V", wm8350);
+
 	wm8350_unmask_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_2P85);
 
 	/* and supply change events */
 	wm8350_register_irq(wm8350, WM8350_IRQ_EXT_USB_FB,
-			    wm8350_charger_handler, NULL);
+			    wm8350_charger_handler, 0, "USB", wm8350);
 	wm8350_unmask_irq(wm8350, WM8350_IRQ_EXT_USB_FB);
 	wm8350_register_irq(wm8350, WM8350_IRQ_EXT_WALL_FB,
-			    wm8350_charger_handler, NULL);
+			    wm8350_charger_handler, 0, "Wall", wm8350);
 	wm8350_unmask_irq(wm8350, WM8350_IRQ_EXT_WALL_FB);
 	wm8350_register_irq(wm8350, WM8350_IRQ_EXT_BAT_FB,
-			    wm8350_charger_handler, NULL);
+			    wm8350_charger_handler, 0, "Battery", wm8350);
 	wm8350_unmask_irq(wm8350, WM8350_IRQ_EXT_BAT_FB);
 }