Skip to contentSkip to conversation

watchdog: imx7ulp: Fix missing conversion of imx7ulp_wdt_enable()

PATCH In review Fabio Estevam 2 participants 2 messages Nov 20, 2019

Subsystems (2)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 watchdog: imx7ulp: Fix missing conversion of imx7ulp_wdt_enable()

Since commit 747d88a1a88c1b ("watchdog: imx7ulp: Pass the wdog instance in imx7ulp_wdt_enable()") imx7ulp_wdt_enable() accepts a watchdog_device structure, so fix one instance that missed such conversion.

This also fixes the following sparse warning:

drivers/watchdog/imx7ulp_wdt.c:115:31: warning: incorrect type in argument 1 (different address spaces)
drivers/watchdog/imx7ulp_wdt.c:115:31: expected struct watchdog_device *wdog
drivers/watchdog/imx7ulp_wdt.c:115:31: got void [noderef] <asn:2>*base

Fixes 747d88a1a88c1 ("watchdog: imx7ulp: Pass the wdog instance inimx7ulp_wdt_enable()")
---
 drivers/watchdog/imx7ulp_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/imx7ulp_wdt.c +1 -1
index 0a87c6f4bab2..11b9e7c6b7f5 100644
@@ -112,7 +112,7 @@ static int imx7ulp_wdt_restart(struct watchdog_device *wdog,
 {
 	struct imx7ulp_wdt_device *wdt = watchdog_get_drvdata(wdog);
 
-	imx7ulp_wdt_enable(wdt->base, true);
+	imx7ulp_wdt_enable(wdog, true);
 	imx7ulp_wdt_set_timeout(&wdt->wdd, 1);
 
 	/* wait for wdog to fire */
Signature · 1 line
2.17.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Fabio Estevam

Since commit 747d88a1a88c1b ("watchdog: imx7ulp: Pass the wdog instance in imx7ulp_wdt_enable()") imx7ulp_wdt_enable() accepts a watchdog_device structure, so fix one instance that missed such conversion.

Quoted 8 lines

This also fixes the following sparse warning:

drivers/watchdog/imx7ulp_wdt.c:115:31: warning: incorrect type in argument 1 (different address spaces)
drivers/watchdog/imx7ulp_wdt.c:115:31: expected struct watchdog_device *wdog
drivers/watchdog/imx7ulp_wdt.c:115:31: got void [noderef] <asn:2>*base

Fixes 747d88a1a88c1 ("watchdog: imx7ulp: Pass the wdog instance inimx7ulp_wdt_enable()")
Quoted 18 lines
---
  drivers/watchdog/imx7ulp_wdt.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/imx7ulp_wdt.c +1 -1
index 0a87c6f4bab2..11b9e7c6b7f5 100644
@@ -112,7 +112,7 @@ static int imx7ulp_wdt_restart(struct watchdog_device *wdog,
  {
  	struct imx7ulp_wdt_device *wdt = watchdog_get_drvdata(wdog);
 
-	imx7ulp_wdt_enable(wdt->base, true);
+	imx7ulp_wdt_enable(wdog, true);
  	imx7ulp_wdt_set_timeout(&wdt->wdd, 1);
 
  	/* wait for wdog to fire */