Skip to contentSkip to conversation

I2C: i2c-pxa - remove incorrect __exit annotations

PATCH In review Dmitry Torokhov 2 participants 2 messages Feb 20, 2013 – Feb 21, 2013 I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 I2C: i2c-pxa - remove incorrect __exit annotations

The remove() methods should not be marked __exit unless we are using platform_driver_probe() which disables unbinding device from driver via sysfs.

---

Compiled only, no hardware.

 drivers/i2c/busses/i2c-pxa.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-pxa.c +2 -2
index 1034d93..4a79e76 100644
@@ -1215,7 +1215,7 @@ emalloc:
 	return ret;
 }
 
-static int __exit i2c_pxa_remove(struct platform_device *dev)
+static int i2c_pxa_remove(struct platform_device *dev)
 {
 	struct pxa_i2c *i2c = platform_get_drvdata(dev);
 
@@ -1269,7 +1269,7 @@ static const struct dev_pm_ops i2c_pxa_dev_pm_ops = {
 
 static struct platform_driver i2c_pxa_driver = {
 	.probe		= i2c_pxa_probe,
-	.remove		= __exit_p(i2c_pxa_remove),
+	.remove		= i2c_pxa_remove,
 	.driver		= {
 		.name	= "pxa2xx-i2c",
 		.owner	= THIS_MODULE,
Signature · 5 lines
1.7.11.7


-- 
Dmitry
#1 lore raw
Quoted 5 lines · Dmitry Torokhov

The remove() methods should not be marked __exit unless we are using platform_driver_probe() which disables unbinding device from driver via sysfs.

Eeks, I broke this with my very first linux patch years ago :) Applied to -next, thanks!