diff mbox series

[v3,3/4] watchdog: cadence_wdt: Group struct member init statements

Message ID 20190709200801.42313-4-tomas.melin@vaisala.com (mailing list archive)
State Changes Requested
Headers show
Series watchdog: cadence_wdt: Support all available prescaler values | expand

Commit Message

Tomas Melin July 9, 2019, 8:09 p.m. UTC
Move init statement and remove stray comment.

Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
---
 drivers/watchdog/cadence_wdt.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Guenter Roeck July 9, 2019, 8:16 p.m. UTC | #1
On Tue, Jul 09, 2019 at 08:09:06PM +0000, Melin Tomas wrote:
> Move init statement and remove stray comment.
> 
> Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>

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

> ---
>  drivers/watchdog/cadence_wdt.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/watchdog/cadence_wdt.c b/drivers/watchdog/cadence_wdt.c
> index a0d7666e7d20..0bdb275d904a 100644
> --- a/drivers/watchdog/cadence_wdt.c
> +++ b/drivers/watchdog/cadence_wdt.c
> @@ -330,6 +330,7 @@ static int cdns_wdt_probe(struct platform_device *pdev)
>  	}
>  
>  	cdns_wdt_device = &wdt->cdns_wdt_device;
> +	cdns_wdt_device->parent = dev;
>  	cdns_wdt_device->info = &cdns_wdt_info;
>  	cdns_wdt_device->ops = &cdns_wdt_ops;
>  	cdns_wdt_device->timeout = CDNS_WDT_DEFAULT_TIMEOUT;
> @@ -356,9 +357,6 @@ static int cdns_wdt_probe(struct platform_device *pdev)
>  		}
>  	}
>  
> -	/* Initialize the members of cdns_wdt structure */
> -	cdns_wdt_device->parent = dev;
> -
>  	watchdog_init_timeout(cdns_wdt_device, wdt_timeout, dev);
>  	watchdog_set_nowayout(cdns_wdt_device, nowayout);
>  	watchdog_stop_on_reboot(cdns_wdt_device);
> -- 
> 2.17.2
>
diff mbox series

Patch

diff --git a/drivers/watchdog/cadence_wdt.c b/drivers/watchdog/cadence_wdt.c
index a0d7666e7d20..0bdb275d904a 100644
--- a/drivers/watchdog/cadence_wdt.c
+++ b/drivers/watchdog/cadence_wdt.c
@@ -330,6 +330,7 @@  static int cdns_wdt_probe(struct platform_device *pdev)
 	}
 
 	cdns_wdt_device = &wdt->cdns_wdt_device;
+	cdns_wdt_device->parent = dev;
 	cdns_wdt_device->info = &cdns_wdt_info;
 	cdns_wdt_device->ops = &cdns_wdt_ops;
 	cdns_wdt_device->timeout = CDNS_WDT_DEFAULT_TIMEOUT;
@@ -356,9 +357,6 @@  static int cdns_wdt_probe(struct platform_device *pdev)
 		}
 	}
 
-	/* Initialize the members of cdns_wdt structure */
-	cdns_wdt_device->parent = dev;
-
 	watchdog_init_timeout(cdns_wdt_device, wdt_timeout, dev);
 	watchdog_set_nowayout(cdns_wdt_device, nowayout);
 	watchdog_stop_on_reboot(cdns_wdt_device);