diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2017-07-26 23:54:38 +0200 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2017-09-09 21:11:55 +0200 |
commit | 9c22b6d33605d4b24e2491fdb743a285e8588738 (patch) | |
tree | 8184096b9fdb9e2abe94ee89ee553c72a9661d77 /drivers/watchdog/renesas_wdt.c | |
parent | 3be42941dd9df9b7c5062fc98c416a15bf4bbc0f (diff) | |
download | linux-stable-9c22b6d33605d4b24e2491fdb743a285e8588738.tar.gz linux-stable-9c22b6d33605d4b24e2491fdb743a285e8588738.tar.bz2 linux-stable-9c22b6d33605d4b24e2491fdb743a285e8588738.zip |
watchdog: renesas_wdt: make 'clk' a variable local to probe()
It is not needed outside probe() anymore.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/renesas_wdt.c')
-rw-r--r-- | drivers/watchdog/renesas_wdt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/watchdog/renesas_wdt.c b/drivers/watchdog/renesas_wdt.c index a03997b418ba..2927b5086e15 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(&pdev->dev, NULL); - if (IS_ERR(priv->clk)) - return PTR_ERR(priv->clk); + clk = devm_clk_get(&pdev->dev, NULL); + if (IS_ERR(clk)) + return PTR_ERR(clk); pm_runtime_enable(&pdev->dev); pm_runtime_get_sync(&pdev->dev); - priv->clk_rate = clk_get_rate(priv->clk); + priv->clk_rate = clk_get_rate(clk); pm_runtime_put(&pdev->dev); if (!priv->clk_rate) { |