Skip to contentSkip to conversation

drivers/net/ethernet: add missing platform_driver owner

PATCH In review Libo Chen 1 participant 1 message May 21, 2013

Subsystems (2)
lore
Share & tools
lore

Libo Chen

author
#0 lore raw

PATCH 9/19 drivers/net/ethernet: add missing platform_driver owner

set the owner of platform_driver, to ensure that the caller of driver holds a module refernece

---
 drivers/net/ethernet/dnet.c   |    3 ++-
 drivers/net/ethernet/korina.c |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)
drivers/net/ethernet/dnet.c +2 -1
index f3d60eb..63c26ad 100644
@@ -970,7 +970,8 @@ static struct platform_driver dnet_driver = {
 	.probe		= dnet_probe,
 	.remove		= dnet_remove,
 	.driver		= {
-		.name		= "dnet",
+		.name	= "dnet",
+		.owner	= THIS_MODULE,
 	},
 };
 
drivers/net/ethernet/korina.c +1 -0
index 5409fe8..c41bcf6 100644
@@ -1223,6 +1223,7 @@ static int korina_remove(struct platform_device *pdev)
 
 static struct platform_driver korina_driver = {
 	.driver.name = "korina",
+	.driver.owner = THIS_MODULE,
 	.probe = korina_probe,
 	.remove = korina_remove,
 };
Signature · 1 line
1.7.1