public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND 5/5] watchdog: sp805_wdt: use devm_clk_get()
@ 2013-04-29  9:16 Jingoo Han
  2013-04-29 10:11 ` Viresh Kumar
  2013-05-25 20:44 ` Wim Van Sebroeck
  0 siblings, 2 replies; 3+ messages in thread
From: Jingoo Han @ 2013-04-29  9:16 UTC (permalink / raw)
  To: 'Andrew Morton'
  Cc: linux-kernel, 'Wim Van Sebroeck', linux-watchdog,
	Jingoo Han

Use devm_clk_get() to make cleanup paths more simple.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/watchdog/sp805_wdt.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c
index 8872642..58df98a 100644
--- a/drivers/watchdog/sp805_wdt.c
+++ b/drivers/watchdog/sp805_wdt.c
@@ -231,7 +231,7 @@ sp805_wdt_probe(struct amba_device *adev, const struct amba_id *id)
 		goto err;
 	}
 
-	wdt->clk = clk_get(&adev->dev, NULL);
+	wdt->clk = devm_clk_get(&adev->dev, NULL);
 	if (IS_ERR(wdt->clk)) {
 		dev_warn(&adev->dev, "Clock not found\n");
 		ret = PTR_ERR(wdt->clk);
@@ -251,15 +251,13 @@ sp805_wdt_probe(struct amba_device *adev, const struct amba_id *id)
 	if (ret) {
 		dev_err(&adev->dev, "watchdog_register_device() failed: %d\n",
 				ret);
-		goto err_register;
+		goto err;
 	}
 	amba_set_drvdata(adev, wdt);
 
 	dev_info(&adev->dev, "registration successful\n");
 	return 0;
 
-err_register:
-	clk_put(wdt->clk);
 err:
 	dev_err(&adev->dev, "Probe Failed!!!\n");
 	return ret;
@@ -272,7 +270,6 @@ static int sp805_wdt_remove(struct amba_device *adev)
 	watchdog_unregister_device(&wdt->wdd);
 	amba_set_drvdata(adev, NULL);
 	watchdog_set_drvdata(&wdt->wdd, NULL);
-	clk_put(wdt->clk);
 
 	return 0;
 }
-- 
1.7.2.5



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH RESEND 5/5] watchdog: sp805_wdt: use devm_clk_get()
  2013-04-29  9:16 [PATCH RESEND 5/5] watchdog: sp805_wdt: use devm_clk_get() Jingoo Han
@ 2013-04-29 10:11 ` Viresh Kumar
  2013-05-25 20:44 ` Wim Van Sebroeck
  1 sibling, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2013-04-29 10:11 UTC (permalink / raw)
  To: Jingoo Han; +Cc: Andrew Morton, linux-kernel, Wim Van Sebroeck, linux-watchdog

On Mon, Apr 29, 2013 at 2:46 PM, Jingoo Han <jg1.han@samsung.com> wrote:
> Use devm_clk_get() to make cleanup paths more simple.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
>  drivers/watchdog/sp805_wdt.c |    7 ++-----
>  1 files changed, 2 insertions(+), 5 deletions(-)

You should have used get_maintainers.pl for getting the cc list.

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH RESEND 5/5] watchdog: sp805_wdt: use devm_clk_get()
  2013-04-29  9:16 [PATCH RESEND 5/5] watchdog: sp805_wdt: use devm_clk_get() Jingoo Han
  2013-04-29 10:11 ` Viresh Kumar
@ 2013-05-25 20:44 ` Wim Van Sebroeck
  1 sibling, 0 replies; 3+ messages in thread
From: Wim Van Sebroeck @ 2013-05-25 20:44 UTC (permalink / raw)
  To: Jingoo Han; +Cc: 'Andrew Morton', linux-kernel, linux-watchdog

Hi Jingoo,

> Use devm_clk_get() to make cleanup paths more simple.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
>  drivers/watchdog/sp805_wdt.c |    7 ++-----
>  1 files changed, 2 insertions(+), 5 deletions(-)
> 

Patch added to linux-watchdog-next.

Kind regards,
Wim.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-25 20:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-29  9:16 [PATCH RESEND 5/5] watchdog: sp805_wdt: use devm_clk_get() Jingoo Han
2013-04-29 10:11 ` Viresh Kumar
2013-05-25 20:44 ` Wim Van Sebroeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox