public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] W1: w1-gpio - fix incorrect __init/__exit markups
@ 2013-02-23  7:58 Dmitry Torokhov
  2013-02-23  7:58 ` [PATCH 2/5] W1: w1-gpio - switch to using dev_pm_ops Dmitry Torokhov
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Dmitry Torokhov @ 2013-02-23  7:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: Evgeniy Polyakov, Greg Kroah-Hartman, Ville Syrjala, Daniel Mack

We should not be using __init/__exit markups on probe() and remove()
methods unless platform_device_probe() is used, because other methods
allow unbinding device through sysfs and these methods should not be
discarded.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---

This was just compiled - no hardware.

 drivers/w1/masters/w1-gpio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c
index 85b363a..799dafd 100644
--- a/drivers/w1/masters/w1-gpio.c
+++ b/drivers/w1/masters/w1-gpio.c
@@ -72,7 +72,7 @@ static int w1_gpio_probe_dt(struct platform_device *pdev)
 	return 0;
 }
 
-static int __init w1_gpio_probe(struct platform_device *pdev)
+static int w1_gpio_probe(struct platform_device *pdev)
 {
 	struct w1_bus_master *master;
 	struct w1_gpio_platform_data *pdata;
@@ -158,7 +158,7 @@ static int __init w1_gpio_probe(struct platform_device *pdev)
 	return err;
 }
 
-static int __exit w1_gpio_remove(struct platform_device *pdev)
+static int w1_gpio_remove(struct platform_device *pdev)
 {
 	struct w1_bus_master *master = platform_get_drvdata(pdev);
 	struct w1_gpio_platform_data *pdata = pdev->dev.platform_data;
@@ -210,7 +210,7 @@ static struct platform_driver w1_gpio_driver = {
 		.of_match_table = of_match_ptr(w1_gpio_dt_ids),
 	},
 	.probe = w1_gpio_probe,
-	.remove	= __exit_p(w1_gpio_remove),
+	.remove = w1_gpio_remove,
 	.suspend = w1_gpio_suspend,
 	.resume = w1_gpio_resume,
 };
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-03-12 23:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-23  7:58 [PATCH 1/5] W1: w1-gpio - fix incorrect __init/__exit markups Dmitry Torokhov
2013-02-23  7:58 ` [PATCH 2/5] W1: w1-gpio - switch to using dev_pm_ops Dmitry Torokhov
2013-02-23  7:58 ` [PATCH 3/5] W1: w1-gpio - guard DT IDs with CONFIG_OF Dmitry Torokhov
2013-02-23  7:58 ` [PATCH 4/5] W1: w1-gpio - rework handling of platform data Dmitry Torokhov
2013-02-23 16:55   ` Ville Syrjälä
2013-02-23 20:06     ` Dmitry Torokhov
2013-02-23  7:58 ` [PATCH 5/5] W1: w1-gpio - switch to using managed resources (devm) Dmitry Torokhov
2013-02-25  6:59 ` [PATCH v2 1/5] W1: w1-gpio - fix incorrect __init/__exit markups Dmitry Torokhov
2013-02-25  6:59   ` [PATCH 2/5] W1: w1-gpio - switch to using dev_pm_ops Dmitry Torokhov
2013-02-25  6:59   ` [PATCH 3/5] W1: w1-gpio - guard DT IDs with CONFIG_OF Dmitry Torokhov
2013-03-12 23:23     ` Greg Kroah-Hartman
2013-02-25  6:59   ` [PATCH 4/5] W1: w1-gpio - rework handling of platform data Dmitry Torokhov
2013-02-25  6:59   ` [PATCH 5/5] W1: w1-gpio - switch to using managed resources (devm) Dmitry Torokhov
2013-03-12 23:23   ` [PATCH v2 1/5] W1: w1-gpio - fix incorrect __init/__exit markups Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox