All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: Wim Van Sebroeck <wim@iguana.be>
Cc: Jamie Iles <jamie@jamieiles.com>,
	Grant Likely <grant.likely@linaro.org>,
	Rob Herring <rob.herring@calxeda.com>,
	devicetree-discuss@lists.ozlabs.org,
	linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org
Subject: [PATCH 2/3] watchdog: dw_wdt: use clk_prepare_enable and clk_disable_unprepare
Date: Wed, 26 Jun 2013 20:04:31 +0200	[thread overview]
Message-ID: <201306262004.31808.heiko@sntech.de> (raw)
In-Reply-To: <201306262003.13256.heiko@sntech.de>

This is necessary to make the driver work with platforms using the
common clock framework.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 drivers/watchdog/dw_wdt.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
index 4d3906d..b922bec 100644
--- a/drivers/watchdog/dw_wdt.c
+++ b/drivers/watchdog/dw_wdt.c
@@ -255,14 +255,14 @@ static int dw_wdt_release(struct inode *inode, struct file *filp)
 #ifdef CONFIG_PM_SLEEP
 static int dw_wdt_suspend(struct device *dev)
 {
-	clk_disable(dw_wdt.clk);
+	clk_disable_unprepare(dw_wdt.clk);
 
 	return 0;
 }
 
 static int dw_wdt_resume(struct device *dev)
 {
-	int err = clk_enable(dw_wdt.clk);
+	int err = clk_prepare_enable(dw_wdt.clk);
 
 	if (err)
 		return err;
@@ -306,7 +306,7 @@ static int dw_wdt_drv_probe(struct platform_device *pdev)
 	if (IS_ERR(dw_wdt.clk))
 		return PTR_ERR(dw_wdt.clk);
 
-	ret = clk_enable(dw_wdt.clk);
+	ret = clk_prepare_enable(dw_wdt.clk);
 	if (ret)
 		return ret;
 
@@ -323,7 +323,7 @@ static int dw_wdt_drv_probe(struct platform_device *pdev)
 	return 0;
 
 out_disable_clk:
-	clk_disable(dw_wdt.clk);
+	clk_disable_unprepare(dw_wdt.clk);
 
 	return ret;
 }
@@ -332,7 +332,7 @@ static int dw_wdt_drv_remove(struct platform_device *pdev)
 {
 	misc_deregister(&dw_wdt_miscdev);
 
-	clk_disable(dw_wdt.clk);
+	clk_disable_unprepare(dw_wdt.clk);
 
 	return 0;
 }
-- 
1.7.10.4


  parent reply	other threads:[~2013-06-26 18:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-26 18:03 [PATCH 0/3] watchdog: dw_wdt: common clock framework and devicetree support Heiko Stübner
2013-06-26 18:03 ` [PATCH 1/3] watchdog: dw_wdt: convert to SIMPLE_DEV_PM_OPS Heiko Stübner
2013-10-01 16:13   ` [1/3] " Guenter Roeck
2013-06-26 18:04 ` Heiko Stübner [this message]
2013-10-01 16:14   ` [2/3] watchdog: dw_wdt: use clk_prepare_enable and clk_disable_unprepare Guenter Roeck
2013-06-26 18:05 ` [PATCH 3/3] watchdog: dw_wdt: add a devicetree binding Heiko Stübner
2013-06-27  6:31   ` Sachin Kamat
2013-06-27  6:31     ` Sachin Kamat
2013-10-29  7:32 ` [PATCH 0/3] watchdog: dw_wdt: common clock framework and devicetree support Wim Van Sebroeck
2013-10-29  8:16   ` Heiko Stübner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201306262004.31808.heiko@sntech.de \
    --to=heiko@sntech.de \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@linaro.org \
    --cc=jamie@jamieiles.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=wim@iguana.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.