diff options
author | Shubhrajyoti D <shubhrajyoti@ti.com> | 2012-01-11 09:20:18 -0500 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2012-01-27 03:53:53 -0500 |
commit | 12c583d8dca3320f36afe51e514dfa709ac0662e (patch) | |
tree | 42a98cc8f7b9efd0c4e3c46d384218c576e32d07 /drivers/watchdog | |
parent | 52ea9a7d7946c03aa1f9eeb71adb0191402724dd (diff) |
watchdog: omap_wdt.c: Fix the mismatch of pm_runtime enable and disable
Currently the watchdog driver calls the pm_runtime_enable and never
the disable. This may cause a warning when pm_runtime_enable
checks for the count match.
Also fixes the error
/build/watchdog # insmod omap_wdt.ko
[ 44.999389] omap_wdt omap_wdt: Unbalanced pm_runtime_enable!
[ 45.011047] OMAP Watchdog Timer Rev 0x00: initial timeout 60 sec
/build/watchdog #
Attempting to fix the same by calling pm_runtime_disable.
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/omap_wdt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c index 4b33e3fd726b..d19ff5145e82 100644 --- a/drivers/watchdog/omap_wdt.c +++ b/drivers/watchdog/omap_wdt.c | |||
@@ -339,6 +339,7 @@ static int __devinit omap_wdt_probe(struct platform_device *pdev) | |||
339 | return 0; | 339 | return 0; |
340 | 340 | ||
341 | err_misc: | 341 | err_misc: |
342 | pm_runtime_disable(wdev->dev); | ||
342 | platform_set_drvdata(pdev, NULL); | 343 | platform_set_drvdata(pdev, NULL); |
343 | iounmap(wdev->base); | 344 | iounmap(wdev->base); |
344 | 345 | ||
@@ -371,6 +372,7 @@ static int __devexit omap_wdt_remove(struct platform_device *pdev) | |||
371 | struct omap_wdt_dev *wdev = platform_get_drvdata(pdev); | 372 | struct omap_wdt_dev *wdev = platform_get_drvdata(pdev); |
372 | struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 373 | struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
373 | 374 | ||
375 | pm_runtime_disable(wdev->dev); | ||
374 | if (!res) | 376 | if (!res) |
375 | return -ENOENT; | 377 | return -ENOENT; |
376 | 378 | ||