LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] mtd: maps: sa1100-flash: remove incorrect __exit markups
@ 2015-03-09 18:10 Dmitry Torokhov
  2015-03-31  0:59 ` Brian Norris
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Torokhov @ 2015-03-09 18:10 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Brian Norris, Wolfram Sang, linux-mtd, linux-kernel

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.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/mtd/maps/sa1100-flash.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/maps/sa1100-flash.c b/drivers/mtd/maps/sa1100-flash.c
index ea69720..892ad6a 100644
--- a/drivers/mtd/maps/sa1100-flash.c
+++ b/drivers/mtd/maps/sa1100-flash.c
@@ -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",
 	},
-- 
2.2.0.rc0.207.ga3a616c


-- 
Dmitry

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

* Re: [PATCH] mtd: maps: sa1100-flash: remove incorrect __exit markups
  2015-03-09 18:10 [PATCH] mtd: maps: sa1100-flash: remove incorrect __exit markups Dmitry Torokhov
@ 2015-03-31  0:59 ` Brian Norris
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Norris @ 2015-03-31  0:59 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: David Woodhouse, Wolfram Sang, linux-mtd, linux-kernel

On Mon, Mar 09, 2015 at 11:10:41AM -0700, Dmitry Torokhov wrote:
> 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.
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Pushed to l2-mtd.git.

Brian

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

end of thread, other threads:[~2015-03-31  0:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-09 18:10 [PATCH] mtd: maps: sa1100-flash: remove incorrect __exit markups Dmitry Torokhov
2015-03-31  0:59 ` Brian Norris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).