Skip to contentSkip to conversation

Regulator: db8500-prcmu - remove incorrect __exit markup

PATCH Applied Dmitry Torokhov 2 participants 2 messages Feb 25, 2013 – Mar 1, 2013 Voltage and current regulator framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Regulator: db8500-prcmu - remove incorrect __exit markup

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/regulator/db8500-prcmu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/regulator/db8500-prcmu.c +2 -2
index 219d162..a53c11a 100644
@@ -528,7 +528,7 @@ static int db8500_regulator_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int __exit db8500_regulator_remove(struct platform_device *pdev)
+static int db8500_regulator_remove(struct platform_device *pdev)
 {
 	int i;
 
@@ -553,7 +553,7 @@ static struct platform_driver db8500_regulator_driver = {
 		.owner = THIS_MODULE,
 	},
 	.probe = db8500_regulator_probe,
-	.remove = __exit_p(db8500_regulator_remove),
+	.remove = db8500_regulator_remove,
 };
 
 static int __init db8500_regulator_init(void)
Signature · 5 lines
1.7.11.7


-- 
Dmitry
Applied
#1 lore raw
Quoted 5 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.

Applied, thanks. Should've been __devexit up until that getting removed.