Skip to contentSkip to conversation

watchdog: imx2_wdt: Fix the argument of watchdog_active()

PATCH In review Fabio Estevam 2 participants 2 messages Dec 16, 2014

Subsystems (2)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 watchdog: imx2_wdt: Fix the argument of watchdog_active()

From: Fabio Estevam <[email protected]>

Fix the following build warning by passing the expected argument type to watchdog_active():

drivers/watchdog/imx2_wdt.c: In function 'imx2_wdt_suspend':
drivers/watchdog/imx2_wdt.c:340:2: warning: passing argument 1 of 'watchdog_active' from incompatible pointer type [enabled by default] In file included from drivers/watchdog/imx2_wdt.c:38:0:
include/linux/watchdog.h:104:20: note: expected 'struct watchdog_device *' but argument is of type 'struct watchdog_device **'

---
 drivers/watchdog/imx2_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/imx2_wdt.c +1 -1
index 51d940b..d6add51 100644
@@ -337,7 +337,7 @@ static int imx2_wdt_suspend(struct device *dev)
 	imx2_wdt_ping(wdog);
 
 	/* Watchdog has been stopped but IP block is still running */
-	if (!watchdog_active(&wdog) && imx2_wdt_is_running(wdev))
+	if (!watchdog_active(wdog) && imx2_wdt_is_running(wdev))
 		del_timer_sync(&wdev->timer);
 
 	clk_disable_unprepare(wdev->clk);
Signature · 1 line
1.9.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Fix the following build warning by passing the expected argument type to watchdog_active():

Quoted 7 lines

drivers/watchdog/imx2_wdt.c: In function 'imx2_wdt_suspend':
drivers/watchdog/imx2_wdt.c:340:2: warning: passing argument 1 of 'watchdog_active' from incompatible pointer type [enabled by default] In file included from drivers/watchdog/imx2_wdt.c:38:0:
include/linux/watchdog.h:104:20: note: expected 'struct watchdog_device *' but argument is of type 'struct watchdog_device **'

Quoted 18 lines
---
  drivers/watchdog/imx2_wdt.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/imx2_wdt.c +1 -1
index 51d940b..d6add51 100644
@@ -337,7 +337,7 @@ static int imx2_wdt_suspend(struct device *dev)
  	imx2_wdt_ping(wdog);
 
  	/* Watchdog has been stopped but IP block is still running */
-	if (!watchdog_active(&wdog) && imx2_wdt_is_running(wdev))
+	if (!watchdog_active(wdog) && imx2_wdt_is_running(wdev))
  		del_timer_sync(&wdev->timer);
 
  	clk_disable_unprepare(wdev->clk);