watchdog: intel-mid_wdt: header and code cleanups
cover watchdog: intel-mid_wdt: header and code cleanups
A few cleanups against the driver, mostly making an order in the header inclusions.
Andy Shevchenko (3):
watchdog: intel-mid_wdt: Remove unused intel-mid.h
watchdog: intel-mid_wdt: Don't use "proxy" headers
watchdog: intel-mid_wdt: Get platform data via dev_get_platdata()
drivers/watchdog/intel-mid_wdt.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
Signature · 1 line
2.43.0.rc1.1.gbec44491f096
PATCH 1/3 watchdog: intel-mid_wdt: Remove unused intel-mid.h
intel-mid.h is providing some core parts of the South Complex PM, which are usually are not used by individual drivers. In particular, this driver doesn't use it, so simply remove the unused header.
--- drivers/watchdog/intel-mid_wdt.c | 1 - 1 file changed, 1 deletion(-)
drivers/watchdog/intel-mid_wdt.c +0 -1
@@ -17,7 +17,6 @@#include <linux/platform_data/intel-mid_wdt.h> #include <asm/intel_scu_ipc.h> -#include <asm/intel-mid.h> #define IPC_WATCHDOG 0xf8
Signature · 1 line
2.43.0.rc1.1.gbec44491f096
Re: [PATCH v1 1/3] watchdog: intel-mid_wdt: Remove unused intel-mid.h
Quoted 5 lines · Andy Shevchenko
intel-mid.his providing some core parts of the South Complex PM, which are usually are not used by individual drivers. In particular, this driver doesn't use it, so simply remove the unused header.Signed-off-by Andy Shevchenko <[email protected]>
Quoted 19 lines
--- drivers/watchdog/intel-mid_wdt.c | 1 - 1 file changed, 1 deletion(-)drivers/watchdog/intel-mid_wdt.c +0
-1@@ -17,7 +17,6 @@#include <linux/platform_data/intel-mid_wdt.h> #include <asm/intel_scu_ipc.h> -#include <asm/intel-mid.h> #define IPC_WATCHDOG 0xf8Signature · 1 line
2.43.0.rc1.1.gbec44491f096
PATCH 2/3 watchdog: intel-mid_wdt: Don't use "proxy" headers
In reply to Andy ShevchenkoUpdate header inclusions to follow IWYU (Include What You Use) principle.
--- drivers/watchdog/intel-mid_wdt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/watchdog/intel-mid_wdt.c +7 -1
@@ -9,11 +9,17 @@* Contact: David Cohen <[email protected]> */ +#include <linux/bitops.h> +#include <linux/device.h> +#include <linux/errno.h> #include <linux/interrupt.h> +#include <linux/math.h> #include <linux/module.h> -#include <linux/nmi.h> +#include <linux/panic.h> #include <linux/platform_device.h> +#include <linux/types.h> #include <linux/watchdog.h> +#include <linux/platform_data/intel-mid_wdt.h> #include <asm/intel_scu_ipc.h>
Signature · 1 line
2.43.0.rc1.1.gbec44491f096
Re: [PATCH v1 2/3] watchdog: intel-mid_wdt: Don't use "proxy" headers
Quoted 4 lines · Andy Shevchenko
Update header inclusions to follow IWYU (Include What You Use) principle.
Signed-off-by Andy Shevchenko <[email protected]>
Quoted 30 lines
--- drivers/watchdog/intel-mid_wdt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)drivers/watchdog/intel-mid_wdt.c +7
-1@@ -9,11 +9,17 @@* Contact: David Cohen <[email protected]> */ +#include <linux/bitops.h> +#include <linux/device.h> +#include <linux/errno.h> #include <linux/interrupt.h> +#include <linux/math.h> #include <linux/module.h> -#include <linux/nmi.h> +#include <linux/panic.h> #include <linux/platform_device.h> +#include <linux/types.h> #include <linux/watchdog.h> +#include <linux/platform_data/intel-mid_wdt.h> #include <asm/intel_scu_ipc.h> Signature · 1 line
2.43.0.rc1.1.gbec44491f096
PATCH 3/3 watchdog: intel-mid_wdt: Get platform data via dev_get_platdata()
In reply to Andy ShevchenkoAccess to platform data via dev_get_platdata() getter to make code cleaner.
--- drivers/watchdog/intel-mid_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/intel-mid_wdt.c +1 -1
@@ -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;
Signature · 1 line
2.43.0.rc1.1.gbec44491f096
Re: [PATCH v1 3/3] watchdog: intel-mid_wdt: Get platform data via dev_get_platdata()
Quoted 3 lines · Andy Shevchenko
Access to platform data via
dev_get_platdata()getter to make code cleaner.Signed-off-by Andy Shevchenko <[email protected]>
Quoted 20 lines
--- drivers/watchdog/intel-mid_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/watchdog/intel-mid_wdt.c +1
-1@@ -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;Signature · 1 line
2.43.0.rc1.1.gbec44491f096