Skip to contentSkip to conversation

soc: imx: imx93-pd: No need to set device_driver owner

PATCH Applied Deepak R Varma 2 participants 2 messages Dec 22, 2022 – Jan 1, 2023 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc: imx: imx93-pd: No need to set device_driver owner

There is no need to exclusively set the .owner member of the struct device_driver when defining the platform_driver struct. The Linux core takes care of setting the .owner member as part of the call to module_platform_driver() helper function.

Issue identified using the platform_no_drv_owner.cocci Coccinelle semantic patch.

---
Note: Proposed change compile tested only using ARM64 defconfig.

 drivers/soc/imx/imx93-pd.c | 1 -
 1 file changed, 1 deletion(-)
drivers/soc/imx/imx93-pd.c +0 -1
index 4d235c8c4924..832deeed8fd6 100644
@@ -164,7 +164,6 @@ MODULE_DEVICE_TABLE(of, imx93_pd_ids);
 static struct platform_driver imx93_power_domain_driver = {
 	.driver = {
 		.name	= "imx93_power_domain",
-		.owner	= THIS_MODULE,
 		.of_match_table = imx93_pd_ids,
 	},
 	.probe = imx93_pd_probe,

--
2.34.1

Applied
#1 lore raw
Quoted 9 lines · Deepak R Varma

There is no need to exclusively set the .owner member of the struct device_driver when defining the platform_driver struct. The Linux core takes care of setting the .owner member as part of the call to module_platform_driver() helper function.

Issue identified using the platform_no_drv_owner.cocci Coccinelle semantic patch.

Applied, thanks!

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel