Commit 9c22b6d3 authored by Wolfram Sang's avatar Wolfram Sang Committed by Wim Van Sebroeck

watchdog: renesas_wdt: make 'clk' a variable local to probe()

It is not needed outside probe() anymore.
Signed-off-by: default avatarWolfram Sang <>
Reviewed-by: default avatarGeert Uytterhoeven <>
Reviewed-by: default avatarGuenter Roeck <>
Signed-off-by: default avatarGuenter Roeck <>
Signed-off-by: default avatarWim Van Sebroeck <>
parent 3be42941
......@@ -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);
priv->clk_rate = clk_get_rate(priv->clk);
priv->clk_rate = clk_get_rate(clk);
if (!priv->clk_rate) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment