watchdog: imx7ulp: Fix missing conversion of imx7ulp_wdt_enable()
diff mbox series

Message ID 20191120140916.25001-1-festevam@gmail.com
State Accepted
Headers show
Series
  • watchdog: imx7ulp: Fix missing conversion of imx7ulp_wdt_enable()
Related show

Commit Message

Fabio Estevam Nov. 20, 2019, 2:09 p.m. UTC
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()")
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 drivers/watchdog/imx7ulp_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Guenter Roeck Nov. 20, 2019, 3:44 p.m. UTC | #1
On 11/20/19 6:09 AM, Fabio Estevam wrote:
> 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()")
> Signed-off-by: Fabio Estevam <festevam@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   drivers/watchdog/imx7ulp_wdt.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/imx7ulp_wdt.c b/drivers/watchdog/imx7ulp_wdt.c
> index 0a87c6f4bab2..11b9e7c6b7f5 100644
> --- a/drivers/watchdog/imx7ulp_wdt.c
> +++ b/drivers/watchdog/imx7ulp_wdt.c
> @@ -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 */
>

Patch
diff mbox series

diff --git a/drivers/watchdog/imx7ulp_wdt.c b/drivers/watchdog/imx7ulp_wdt.c
index 0a87c6f4bab2..11b9e7c6b7f5 100644
--- a/drivers/watchdog/imx7ulp_wdt.c
+++ b/drivers/watchdog/imx7ulp_wdt.c
@@ -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 */