diff mbox series

[v1,3/3] watchdog: intel-mid_wdt: Get platform data via dev_get_platdata()

Message ID 20240305165306.1366823-4-andriy.shevchenko@linux.intel.com
State New
Headers show
Series watchdog: intel-mid_wdt: header and code cleanups | expand

Commit Message

Andy Shevchenko March 5, 2024, 4:52 p.m. UTC
Access to platform data via dev_get_platdata() getter to make code cleaner.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/watchdog/intel-mid_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Guenter Roeck March 5, 2024, 5:57 p.m. UTC | #1
On Tue, Mar 05, 2024 at 06:52:20PM +0200, Andy Shevchenko wrote:
> Access to platform data via dev_get_platdata() getter to make code cleaner.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

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

> ---
>  drivers/watchdog/intel-mid_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/intel-mid_wdt.c b/drivers/watchdog/intel-mid_wdt.c
> index 06d5d207a065..8d71f6a2236b 100644
> --- a/drivers/watchdog/intel-mid_wdt.c
> +++ b/drivers/watchdog/intel-mid_wdt.c
> @@ -127,7 +127,7 @@ static int mid_wdt_probe(struct platform_device *pdev)
>  {
>  	struct device *dev = &pdev->dev;
>  	struct watchdog_device *wdt_dev;
> -	struct intel_mid_wdt_pdata *pdata = dev->platform_data;
> +	struct intel_mid_wdt_pdata *pdata = dev_get_platdata(dev);
>  	struct mid_wdt *mid;
>  	int ret;
>  
> -- 
> 2.43.0.rc1.1.gbec44491f096
>
diff mbox series

Patch

diff --git a/drivers/watchdog/intel-mid_wdt.c b/drivers/watchdog/intel-mid_wdt.c
index 06d5d207a065..8d71f6a2236b 100644
--- a/drivers/watchdog/intel-mid_wdt.c
+++ b/drivers/watchdog/intel-mid_wdt.c
@@ -127,7 +127,7 @@  static int mid_wdt_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct watchdog_device *wdt_dev;
-	struct intel_mid_wdt_pdata *pdata = dev->platform_data;
+	struct intel_mid_wdt_pdata *pdata = dev_get_platdata(dev);
 	struct mid_wdt *mid;
 	int ret;