Re: [RFC PATCH 2/3] watchdog: renesas_wdt: make 'clk' a variable local to probe()

2017-08-17 Thread Geert Uytterhoeven
On Wed, Jul 26, 2017 at 11:54 PM, Wolfram Sang
 wrote:
> It is not needed outside probe() anymore.
>
> Signed-off-by: Wolfram Sang 

Reviewed-by: Geert Uytterhoeven 

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


[RFC PATCH 2/3] watchdog: renesas_wdt: make 'clk' a variable local to probe()

2017-07-26 Thread Wolfram Sang
It is not needed outside probe() anymore.

Signed-off-by: Wolfram Sang 
---
 drivers/watchdog/renesas_wdt.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/watchdog/renesas_wdt.c b/drivers/watchdog/renesas_wdt.c
index a03997b418ba9c..2927b5086e156e 100644
--- a/drivers/watchdog/renesas_wdt.c
+++ b/drivers/watchdog/renesas_wdt.c
@@ -48,7 +48,6 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once 
started (default="
 struct rwdt_priv {
void __iomem *base;
struct watchdog_device wdev;
-   struct clk *clk;
unsigned long clk_rate;
u8 cks;
 };
@@ -125,6 +124,7 @@ static int rwdt_probe(struct platform_device *pdev)
 {
struct rwdt_priv *priv;
struct resource *res;
+   struct clk *clk;
unsigned long clks_per_sec;
int ret, i;
 
@@ -137,14 +137,14 @@ static int rwdt_probe(struct platform_device *pdev)
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);
 
-   priv->clk = devm_clk_get(>dev, NULL);
-   if (IS_ERR(priv->clk))
-   return PTR_ERR(priv->clk);
+   clk = devm_clk_get(>dev, NULL);
+   if (IS_ERR(clk))
+   return PTR_ERR(clk);
 
pm_runtime_enable(>dev);
 
pm_runtime_get_sync(>dev);
-   priv->clk_rate = clk_get_rate(priv->clk);
+   priv->clk_rate = clk_get_rate(clk);
pm_runtime_put(>dev);
 
if (!priv->clk_rate) {
-- 
2.11.0