Skip to contentSkip to conversation

mfd: twl4030-madc: add __exit macro to remove

PATCH In review Jingoo Han 1 participant 3 messages Feb 19, 2013 – Feb 20, 2013

Subsystems (2)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/1 mfd: twl4030-madc: add __exit macro to remove

Fixed build warning as below:

drivers/mfd/twl4030-madc.c:788:12: warning: 'twl4030_madc_remove' defined but not used [-Wunused-function]

---
 drivers/mfd/twl4030-madc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mfd/twl4030-madc.c +1 -1
index 88ff9dc..86ba920 100644
@@ -785,7 +785,7 @@ err_power:
 	return ret;
 }
 
-static int twl4030_madc_remove(struct platform_device *pdev)
+static int __exit twl4030_madc_remove(struct platform_device *pdev)
 {
 	struct twl4030_madc_data *madc = platform_get_drvdata(pdev);
 
Signature · 1 line
1.7.2.5
author
#1 lore raw
Quoted 16 lines · Jingoo Han

Fixed build warning as below:

drivers/mfd/twl4030-madc.c:788:12: warning: 'twl4030_madc_remove' defined but not used [-Wunused- function]

---
 drivers/mfd/twl4030-madc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mfd/twl4030-madc.c +0 -0
index 88ff9dc..86ba920 100644

drivers/mfd/twl4030-madc.c err_power: · line 790

Quoted 7 lines
drivers/mfd/twl4030-madc.c +1 -1
@@ -785,7 +785,7 @@ err_power:
 	return ret;
 }
 
-static int twl4030_madc_remove(struct platform_device *pdev)
+static int __exit twl4030_madc_remove(struct platform_device *pdev)
 {
 	struct twl4030_madc_data *madc = platform_get_drvdata(pdev);

Removing __exit_p() would be better.
I will send V2 patch.

Quoted 3 lines
drivers/mfd/twl4030-madc.c +0 -1
--

1.7.2.5

author
#2 lore raw

PATCH v2 1/1 mfd: twl4030-madc: remove erroneous __exit_p() in twl4030_madc_driver

In reply to Jingoo Han

This __exit_p() causes an build warning as below. Thus, it should be removed.

drivers/mfd/twl4030-madc.c:788:12: warning: 'twl4030_madc_remove' defined but not used [-Wunused-function]

---
 drivers/mfd/twl4030-madc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mfd/twl4030-madc.c +1 -1
index 88ff9dc..942b666 100644
@@ -800,7 +800,7 @@ static int twl4030_madc_remove(struct platform_device *pdev)
 
 static struct platform_driver twl4030_madc_driver = {
 	.probe = twl4030_madc_probe,
-	.remove = __exit_p(twl4030_madc_remove),
+	.remove = twl4030_madc_remove,
 	.driver = {
 		   .name = "twl4030_madc",
 		   .owner = THIS_MODULE,
Signature · 1 line
1.7.2.5