Skip to contentSkip to conversation

mtd: maps: sa1100-flash: remove incorrect __exit markups

PATCH Applied Dmitry Torokhov 2 participants 2 messages Mar 9, 2015 – Mar 31, 2015 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: maps: sa1100-flash: remove incorrect __exit markups

Even if bus is not hot-pluggable, the devices can be unbound from the driver via sysfs, so we should not be using __exit annotations on remove() methods. The only exception is drivers registered with platform_driver_probe() which specifically disables sysfs bind/unbind attributes.

---
 drivers/mtd/maps/sa1100-flash.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/maps/sa1100-flash.c +2 -2
index ea69720..892ad6a 100644
@@ -274,7 +274,7 @@ static int sa1100_mtd_probe(struct platform_device *pdev)
 	return err;
 }
 
-static int __exit sa1100_mtd_remove(struct platform_device *pdev)
+static int sa1100_mtd_remove(struct platform_device *pdev)
 {
 	struct sa_info *info = platform_get_drvdata(pdev);
 	struct flash_platform_data *plat = dev_get_platdata(&pdev->dev);
@@ -286,7 +286,7 @@ static int __exit sa1100_mtd_remove(struct platform_device *pdev)
 
 static struct platform_driver sa1100_mtd_driver = {
 	.probe		= sa1100_mtd_probe,
-	.remove		= __exit_p(sa1100_mtd_remove),
+	.remove		= sa1100_mtd_remove,
 	.driver		= {
 		.name	= "sa1100-mtd",
 	},
Signature · 5 lines
2.2.0.rc0.207.ga3a616c


-- 
Dmitry
Applied
#1 lore raw
Quoted 7 lines · Dmitry Torokhov

Even if bus is not hot-pluggable, the devices can be unbound from the driver via sysfs, so we should not be using __exit annotations on remove() methods. The only exception is drivers registered with platform_driver_probe() which specifically disables sysfs bind/unbind attributes.

Pushed to l2-mtd.git.

Brian