[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1377947000-5746-3-git-send-email-broonie@kernel.org>
Date: Sat, 31 Aug 2013 12:03:19 +0100
From: Mark Brown <broonie@...nel.org>
To: Liam Girdwood <lgirdwood@...il.com>
Cc: patches@...nsource.wolfsonmicro.com, linux-kernel@...r.kernel.org,
linaro-kernel@...ts.linaro.org, Mark Brown <broonie@...aro.org>
Subject: [PATCH 3/4] regulator: wm831x-isink: Use devm_request_threaded_irq()
From: Mark Brown <broonie@...aro.org>
devm guarantees that resources are freed in the opposite order to that in
which they are allocated.
Signed-off-by: Mark Brown <broonie@...aro.org>
---
drivers/regulator/wm831x-isink.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/wm831x-isink.c b/drivers/regulator/wm831x-isink.c
index 4eb373d..841cb52 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;
--
1.8.4.rc3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists