summaryrefslogtreecommitdiff
path: root/drivers/watchdog/omap_wdt.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2009-01-23 12:48:37 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-02-08 17:50:16 +0000
commit4c5e1946b5f89c33e3bc8ed73fa7ba8f31e37cc5 (patch)
treefb8892538fc97ce6d6836c8f82b9342a55e3e970 /drivers/watchdog/omap_wdt.c
parent39a80c7f379e1c1d3e63b204b8353b7381d0a3d5 (diff)
[ARM] omap: watchdog: provide a dummy ick for OMAP1
Eliminate the OMAP1 vs OMAP2 clock knowledge in the watchdog driver. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/watchdog/omap_wdt.c')
-rw-r--r--drivers/watchdog/omap_wdt.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index 1a4c699762e6..aa5ad6e33f02 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -145,8 +145,7 @@ static int omap_wdt_open(struct inode *inode, struct file *file)
if (test_and_set_bit(1, (unsigned long *)&(wdev->omap_wdt_users)))
return -EBUSY;
- if (wdev->ick)
- clk_enable(wdev->ick); /* Enable the interface clock */
+ clk_enable(wdev->ick); /* Enable the interface clock */
clk_enable(wdev->fck); /* Enable the functional clock */
/* initialize prescaler */
@@ -176,8 +175,7 @@ static int omap_wdt_release(struct inode *inode, struct file *file)
omap_wdt_disable(wdev);
- if (wdev->ick)
- clk_disable(wdev->ick);
+ clk_disable(wdev->ick);
clk_disable(wdev->fck);
#else
printk(KERN_CRIT "omap_wdt: Unexpected close, not stopping!\n");
@@ -294,13 +292,11 @@ static int __init omap_wdt_probe(struct platform_device *pdev)
wdev->omap_wdt_users = 0;
wdev->mem = mem;
- if (cpu_is_omap24xx() || cpu_is_omap34xx()) {
- wdev->ick = clk_get(&pdev->dev, "ick");
- if (IS_ERR(wdev->ick)) {
- ret = PTR_ERR(wdev->ick);
- wdev->ick = NULL;
- goto err_clk;
- }
+ wdev->ick = clk_get(&pdev->dev, "ick");
+ if (IS_ERR(wdev->ick)) {
+ ret = PTR_ERR(wdev->ick);
+ wdev->ick = NULL;
+ goto err_clk;
}
wdev->fck = clk_get(&pdev->dev, "fck");
if (IS_ERR(wdev->fck)) {
@@ -383,10 +379,7 @@ static int omap_wdt_remove(struct platform_device *pdev)
release_mem_region(res->start, res->end - res->start + 1);
platform_set_drvdata(pdev, NULL);
- if (wdev->ick) {
- clk_put(wdev->ick);
- }
-
+ clk_put(wdev->ick);
clk_put(wdev->fck);
iounmap(wdev->base);