Skip to contentSkip to conversation

staging: gpib: Remove unnecessary .owner assignment

PATCH New Yu-Chun Lin 1 participant 1 message Jan 19, 2025 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: gpib: Remove unnecessary .owner assignment

The driver core automatically sets the '.owner' field, so there is no need to assign 'THIS_MODULE' explicitly.

This change fixes the warning reported by the kernel test robot:

cocci warnings: (new ones prefixed by >>)

Quoted 1 line
Quoted 1 line

drivers/staging/gpib/eastwood/fluke_gpib.c:1145:3-8: No need to set .owner here. The core will do it.

---
 drivers/staging/gpib/eastwood/fluke_gpib.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/gpib/eastwood/fluke_gpib.c +0 -1
index 5e59d38beb35..c6ec8ff8b6bb 100644
@@ -1143,7 +1143,6 @@ MODULE_DEVICE_TABLE(of, fluke_gpib_of_match);
 static struct platform_driver fluke_gpib_platform_driver = {
 	.driver = {
 		.name = "fluke_gpib",
-		.owner = THIS_MODULE,
 		.of_match_table = fluke_gpib_of_match,
 	},
 	.probe = &fluke_gpib_probe
Signature · 1 line
2.43.0