diff options
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/wm8350-regulator.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c index 768bd0e5b48b..8c289fd4add2 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 | ||
1333 | static void pmic_uv_handler(struct wm8350 *wm8350, int irq, void *data) | 1333 | static 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 | ||
1349 | static int wm8350_regulator_probe(struct platform_device *pdev) | 1352 | static 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", |