aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/pnx4008_wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/pnx4008_wdt.c')
-rw-r--r--drivers/watchdog/pnx4008_wdt.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
index a3684a30eb69..b30bd430f591 100644
--- a/drivers/watchdog/pnx4008_wdt.c
+++ b/drivers/watchdog/pnx4008_wdt.c
@@ -159,13 +159,13 @@ static int pnx4008_wdt_probe(struct platform_device *pdev)
159 if (IS_ERR(wdt_base)) 159 if (IS_ERR(wdt_base))
160 return PTR_ERR(wdt_base); 160 return PTR_ERR(wdt_base);
161 161
162 wdt_clk = clk_get(&pdev->dev, NULL); 162 wdt_clk = devm_clk_get(&pdev->dev, NULL);
163 if (IS_ERR(wdt_clk)) 163 if (IS_ERR(wdt_clk))
164 return PTR_ERR(wdt_clk); 164 return PTR_ERR(wdt_clk);
165 165
166 ret = clk_enable(wdt_clk); 166 ret = clk_enable(wdt_clk);
167 if (ret) 167 if (ret)
168 goto out; 168 return ret;
169 169
170 pnx4008_wdd.bootstatus = (readl(WDTIM_RES(wdt_base)) & WDOG_RESET) ? 170 pnx4008_wdd.bootstatus = (readl(WDTIM_RES(wdt_base)) & WDOG_RESET) ?
171 WDIOF_CARDRESET : 0; 171 WDIOF_CARDRESET : 0;
@@ -186,8 +186,6 @@ static int pnx4008_wdt_probe(struct platform_device *pdev)
186 186
187disable_clk: 187disable_clk:
188 clk_disable(wdt_clk); 188 clk_disable(wdt_clk);
189out:
190 clk_put(wdt_clk);
191 return ret; 189 return ret;
192} 190}
193 191
@@ -196,7 +194,6 @@ static int pnx4008_wdt_remove(struct platform_device *pdev)
196 watchdog_unregister_device(&pnx4008_wdd); 194 watchdog_unregister_device(&pnx4008_wdd);
197 195
198 clk_disable(wdt_clk); 196 clk_disable(wdt_clk);
199 clk_put(wdt_clk);
200 197
201 return 0; 198 return 0;
202} 199}