Skip to content

Commit

Permalink
watchdog: omap_wdt.c: Fix the mismatch of pm_runtime enable and disable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shubhrajyoti D authored and Wim Van Sebroeck committed Jan 27, 2012
1 parent 52ea9a7 commit 12c583d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/watchdog/omap_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ static int __devinit omap_wdt_probe(struct platform_device *pdev)
return 0;

err_misc:
pm_runtime_disable(wdev->dev);
platform_set_drvdata(pdev, NULL);
iounmap(wdev->base);

Expand Down Expand Up @@ -371,6 +372,7 @@ static int __devexit omap_wdt_remove(struct platform_device *pdev)
struct omap_wdt_dev *wdev = platform_get_drvdata(pdev);
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);

pm_runtime_disable(wdev->dev);
if (!res)
return -ENOENT;

Expand Down

0 comments on commit 12c583d

Please sign in to comment.