Skip to content

Commit

Permalink
mtd: maps: sa1100-flash: remove incorrect __exit markups
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
  • Loading branch information
Dmitry Torokhov authored and Brian Norris committed Mar 31, 2015
1 parent 318157a commit 271afb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mtd/maps/sa1100-flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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",
},
Expand Down

0 comments on commit 271afb4

Please sign in to comment.