public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] power: supply: twl4030_charger: remove incorrect __exit markups
@ 2017-03-01 23:44 Dmitry Torokhov
  2017-03-15 21:12 ` Sebastian Reichel
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Torokhov @ 2017-03-01 23:44 UTC (permalink / raw)
  To: Sebastian Reichel; +Cc: linux-pm, 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/power/supply/twl4030_charger.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/power/supply/twl4030_charger.c b/drivers/power/supply/twl4030_charger.c
index bcd4dc304f27..990ff3d218bc 100644
--- a/drivers/power/supply/twl4030_charger.c
+++ b/drivers/power/supply/twl4030_charger.c
@@ -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);
 
@@ -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);
 
-- 
2.12.0.rc1.440.g5b76565f74-goog


-- 
Dmitry

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

* Re: [PATCH] power: supply: twl4030_charger: remove incorrect __exit markups
  2017-03-01 23:44 [PATCH] power: supply: twl4030_charger: remove incorrect __exit markups Dmitry Torokhov
@ 2017-03-15 21:12 ` Sebastian Reichel
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2017-03-15 21:12 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-pm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 478 bytes --]

Hi Dmitry,

On Wed, Mar 01, 2017 at 03:44:53PM -0800, 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>

Thanks, merged.

-- Sebastian

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2017-03-15 21:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-01 23:44 [PATCH] power: supply: twl4030_charger: remove incorrect __exit markups Dmitry Torokhov
2017-03-15 21:12 ` Sebastian Reichel

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