aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/wm8350-regulator.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator/wm8350-regulator.c')
-rw-r--r--drivers/regulator/wm8350-regulator.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c
index 768bd0e5b48b..1bbff099a546 100644
--- a/drivers/regulator/wm8350-regulator.c
+++ b/drivers/regulator/wm8350-regulator.c
@@ -1330,9 +1330,10 @@ static struct regulator_desc wm8350_reg[NUM_WM8350_REGULATORS] = {
1330 }, 1330 },
1331}; 1331};
1332 1332
1333static void pmic_uv_handler(struct wm8350 *wm8350, int irq, void *data) 1333static irqreturn_t pmic_uv_handler(int irq, void *data)
1334{ 1334{
1335 struct regulator_dev *rdev = (struct regulator_dev *)data; 1335 struct regulator_dev *rdev = (struct regulator_dev *)data;
1336 struct wm8350 *wm8350 = rdev_get_drvdata(rdev);
1336 1337
1337 mutex_lock(&rdev->mutex); 1338 mutex_lock(&rdev->mutex);
1338 if (irq == WM8350_IRQ_CS1 || irq == WM8350_IRQ_CS2) 1339 if (irq == WM8350_IRQ_CS1 || irq == WM8350_IRQ_CS2)
@@ -1344,6 +1345,8 @@ static void pmic_uv_handler(struct wm8350 *wm8350, int irq, void *data)
1344 REGULATOR_EVENT_UNDER_VOLTAGE, 1345 REGULATOR_EVENT_UNDER_VOLTAGE,
1345 wm8350); 1346 wm8350);
1346 mutex_unlock(&rdev->mutex); 1347 mutex_unlock(&rdev->mutex);
1348
1349 return IRQ_HANDLED;
1347} 1350}
1348 1351
1349static int wm8350_regulator_probe(struct platform_device *pdev) 1352static int wm8350_regulator_probe(struct platform_device *pdev)
@@ -1388,7 +1391,7 @@ static int wm8350_regulator_probe(struct platform_device *pdev)
1388 1391
1389 /* register regulator IRQ */ 1392 /* register regulator IRQ */
1390 ret = wm8350_register_irq(wm8350, wm8350_reg[pdev->id].irq, 1393 ret = wm8350_register_irq(wm8350, wm8350_reg[pdev->id].irq,
1391 pmic_uv_handler, rdev); 1394 pmic_uv_handler, 0, "UV", rdev);
1392 if (ret < 0) { 1395 if (ret < 0) {
1393 regulator_unregister(rdev); 1396 regulator_unregister(rdev);
1394 dev_err(&pdev->dev, "failed to register regulator %s IRQ\n", 1397 dev_err(&pdev->dev, "failed to register regulator %s IRQ\n",
@@ -1396,8 +1399,6 @@ static int wm8350_regulator_probe(struct platform_device *pdev)
1396 return ret; 1399 return ret;
1397 } 1400 }
1398 1401
1399 wm8350_unmask_irq(wm8350, wm8350_reg[pdev->id].irq);
1400
1401 return 0; 1402 return 0;
1402} 1403}
1403 1404
@@ -1406,7 +1407,6 @@ static int wm8350_regulator_remove(struct platform_device *pdev)
1406 struct regulator_dev *rdev = platform_get_drvdata(pdev); 1407 struct regulator_dev *rdev = platform_get_drvdata(pdev);
1407 struct wm8350 *wm8350 = rdev_get_drvdata(rdev); 1408 struct wm8350 *wm8350 = rdev_get_drvdata(rdev);
1408 1409
1409 wm8350_mask_irq(wm8350, wm8350_reg[pdev->id].irq);
1410 wm8350_free_irq(wm8350, wm8350_reg[pdev->id].irq); 1410 wm8350_free_irq(wm8350, wm8350_reg[pdev->id].irq);
1411 1411
1412 regulator_unregister(rdev); 1412 regulator_unregister(rdev);