Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305239
b: refs/heads/master
c: d42c974
h: refs/heads/master
i:
  305237: 8814fa2
  305235: 19b0729
  305231: f494f43
v: v3
  • Loading branch information
Paul Mundt committed May 10, 2012
1 parent e5d7ac9 commit ed06794
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8c013d964ac32c20afe2cdeadf59926d87012b37
refs/heads/master: d42c97443da5a542201f6cbaf793606877115d05
12 changes: 5 additions & 7 deletions trunk/drivers/watchdog/shwdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ static int sh_wdt_start(struct watchdog_device *wdt_dev)
u8 csr;

pm_runtime_get_sync(wdt->dev);
clk_enable(wdt->clk);

spin_lock_irqsave(&wdt->lock, flags);

Expand Down Expand Up @@ -140,6 +141,7 @@ static int sh_wdt_stop(struct watchdog_device *wdt_dev)

spin_unlock_irqrestore(&wdt->lock, flags);

clk_disable(wdt->clk);
pm_runtime_put_sync(wdt->dev);

return 0;
Expand Down Expand Up @@ -247,12 +249,10 @@ static int __devinit sh_wdt_probe(struct platform_device *pdev)
wdt->clk = NULL;
}

clk_enable(wdt->clk);

wdt->base = devm_request_and_ioremap(wdt->dev, res);
if (unlikely(!wdt->base)) {
rc = -EADDRNOTAVAIL;
goto out_disable;
goto err;
}

watchdog_set_nowayout(&sh_wdt_dev, nowayout);
Expand All @@ -276,7 +276,7 @@ static int __devinit sh_wdt_probe(struct platform_device *pdev)
rc = watchdog_register_device(&sh_wdt_dev);
if (unlikely(rc)) {
dev_err(&pdev->dev, "Can't register watchdog (err=%d)\n", rc);
goto out_disable;
goto err;
}

init_timer(&wdt->timer);
Expand All @@ -292,8 +292,7 @@ static int __devinit sh_wdt_probe(struct platform_device *pdev)

return 0;

out_disable:
clk_disable(wdt->clk);
err:
clk_put(wdt->clk);

return rc;
Expand All @@ -308,7 +307,6 @@ static int __devexit sh_wdt_remove(struct platform_device *pdev)
watchdog_unregister_device(&sh_wdt_dev);

pm_runtime_disable(&pdev->dev);
clk_disable(wdt->clk);
clk_put(wdt->clk);

return 0;
Expand Down

0 comments on commit ed06794

Please sign in to comment.