Skip to content

Commit

Permalink
power: supply: twl4030_charger: 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 <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
  • Loading branch information
dtor authored and sre committed Apr 13, 2017
1 parent f7a388d commit 420b2d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/power/supply/twl4030_charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,7 @@ static int twl4030_bci_probe(struct platform_device *pdev)
return ret;
}

static int __exit twl4030_bci_remove(struct platform_device *pdev)
static int twl4030_bci_remove(struct platform_device *pdev)
{
struct twl4030_bci *bci = platform_get_drvdata(pdev);

Expand Down Expand Up @@ -1148,11 +1148,11 @@ MODULE_DEVICE_TABLE(of, twl_bci_of_match);

static struct platform_driver twl4030_bci_driver = {
.probe = twl4030_bci_probe,
.remove = twl4030_bci_remove,
.driver = {
.name = "twl4030_bci",
.of_match_table = of_match_ptr(twl_bci_of_match),
},
.remove = __exit_p(twl4030_bci_remove),
};
module_platform_driver(twl4030_bci_driver);

Expand Down

0 comments on commit 420b2d4

Please sign in to comment.