summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/wm831x-isink.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-08-31 11:48:45 +0100
committerMark Brown <broonie@linaro.org>2013-09-17 00:27:53 +0100
commit63fb3149c8ba2b0194ba7e967f2dafc1c8c0da69 (patch)
treeccd3135fc6aeb6634a7ea7f7eec15989d09f53c0 /drivers/regulator/wm831x-isink.c
parentb0c4c0c68982156bfb94993305e69a03309395c3 (diff)
downloadtalos-obmc-linux-63fb3149c8ba2b0194ba7e967f2dafc1c8c0da69.tar.gz
talos-obmc-linux-63fb3149c8ba2b0194ba7e967f2dafc1c8c0da69.zip
regulator: wm831x-isink: Use devm_request_threaded_irq()
devm guarantees that resources are freed in the opposite order to that in which they are allocated. Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/wm831x-isink.c')
-rw-r--r--drivers/regulator/wm831x-isink.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/regulator/wm831x-isink.c b/drivers/regulator/wm831x-isink.c
index 4eb373de1fac..841cb52b2bb6 100644
--- a/drivers/regulator/wm831x-isink.c
+++ b/drivers/regulator/wm831x-isink.c
@@ -203,8 +203,10 @@ static int wm831x_isink_probe(struct platform_device *pdev)
}
irq = wm831x_irq(wm831x, platform_get_irq(pdev, 0));
- ret = request_threaded_irq(irq, NULL, wm831x_isink_irq,
- IRQF_TRIGGER_RISING, isink->name, isink);
+ ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
+ wm831x_isink_irq,
+ IRQF_TRIGGER_RISING, isink->name,
+ isink);
if (ret != 0) {
dev_err(&pdev->dev, "Failed to request ISINK IRQ %d: %d\n",
irq, ret);
@@ -225,8 +227,6 @@ static int wm831x_isink_remove(struct platform_device *pdev)
{
struct wm831x_isink *isink = platform_get_drvdata(pdev);
- free_irq(wm831x_irq(isink->wm831x, platform_get_irq(pdev, 0)), isink);
-
regulator_unregister(isink->regulator);
return 0;
OpenPOWER on IntegriCloud