diff mbox series

[-next] watchdog: menz069_wdt: Remove redundant initialization owner in men_z069_driver

Message ID 20230804100617.100251-1-lizetao1@huawei.com (mailing list archive)
State Accepted
Headers show
Series [-next] watchdog: menz069_wdt: Remove redundant initialization owner in men_z069_driver | expand

Commit Message

Li Zetao Aug. 4, 2023, 10:06 a.m. UTC
The module_mcb_driver() will set "THIS_MODULE" to driver.owner when
register a mcb_driver driver, so it is redundant initialization to set
driver.owner in men_z069_driver statement. Remove it for clean code.

Signed-off-by: Li Zetao <lizetao1@huawei.com>
---
 drivers/watchdog/menz69_wdt.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Guenter Roeck Aug. 4, 2023, 3:45 p.m. UTC | #1
On 8/4/23 03:06, Li Zetao wrote:
> The module_mcb_driver() will set "THIS_MODULE" to driver.owner when
> register a mcb_driver driver, so it is redundant initialization to set
> driver.owner in men_z069_driver statement. Remove it for clean code.
> 
> Signed-off-by: Li Zetao <lizetao1@huawei.com>

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

> ---
>   drivers/watchdog/menz69_wdt.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/watchdog/menz69_wdt.c b/drivers/watchdog/menz69_wdt.c
> index 3c98030b9fcd..c7de30270043 100644
> --- a/drivers/watchdog/menz69_wdt.c
> +++ b/drivers/watchdog/menz69_wdt.c
> @@ -153,7 +153,6 @@ MODULE_DEVICE_TABLE(mcb, men_z069_ids);
>   static struct mcb_driver men_z069_driver = {
>   	.driver = {
>   		.name = "z069-wdt",
> -		.owner = THIS_MODULE,
>   	},
>   	.probe = men_z069_probe,
>   	.remove = men_z069_remove,
diff mbox series

Patch

diff --git a/drivers/watchdog/menz69_wdt.c b/drivers/watchdog/menz69_wdt.c
index 3c98030b9fcd..c7de30270043 100644
--- a/drivers/watchdog/menz69_wdt.c
+++ b/drivers/watchdog/menz69_wdt.c
@@ -153,7 +153,6 @@  MODULE_DEVICE_TABLE(mcb, men_z069_ids);
 static struct mcb_driver men_z069_driver = {
 	.driver = {
 		.name = "z069-wdt",
-		.owner = THIS_MODULE,
 	},
 	.probe = men_z069_probe,
 	.remove = men_z069_remove,