public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtc: omap: remove incorrect __exit markups
@ 2017-03-01 23:33 Dmitry Torokhov
  2017-03-02  0:13 ` Sebastian Reichel
  2017-03-09  0:33 ` Alexandre Belloni
  0 siblings, 2 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2017-03-01 23:33 UTC (permalink / raw)
  To: Alexandre Belloni; +Cc: Alessandro Zummo, rtc-linux, linux-kernel

Even if bus is not hot-pluggable, 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/rtc/rtc-omap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c
index 51e52446eacb..fa856d9c5e23 100644
--- a/drivers/rtc/rtc-omap.c
+++ b/drivers/rtc/rtc-omap.c
@@ -844,7 +844,7 @@ static int omap_rtc_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int __exit omap_rtc_remove(struct platform_device *pdev)
+static int omap_rtc_remove(struct platform_device *pdev)
 {
 	struct omap_rtc *rtc = platform_get_drvdata(pdev);
 	u8 reg;
@@ -964,7 +964,7 @@ static void omap_rtc_shutdown(struct platform_device *pdev)
 
 static struct platform_driver omap_rtc_driver = {
 	.probe		= omap_rtc_probe,
-	.remove		= __exit_p(omap_rtc_remove),
+	.remove		= omap_rtc_remove,
 	.shutdown	= omap_rtc_shutdown,
 	.driver		= {
 		.name	= "omap_rtc",
-- 
2.12.0.rc1.440.g5b76565f74-goog


-- 
Dmitry

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

* Re: [PATCH] rtc: omap: remove incorrect __exit markups
  2017-03-01 23:33 [PATCH] rtc: omap: remove incorrect __exit markups Dmitry Torokhov
@ 2017-03-02  0:13 ` Sebastian Reichel
  2017-03-09  0:33 ` Alexandre Belloni
  1 sibling, 0 replies; 3+ messages in thread
From: Sebastian Reichel @ 2017-03-02  0:13 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Alexandre Belloni, Alessandro Zummo, rtc-linux, linux-kernel

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

Hi,

On Wed, Mar 01, 2017 at 03:33:23PM -0800, Dmitry Torokhov wrote:
> Even if bus is not hot-pluggable, 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>

Reviewed-By: Sebastian Reichel <sre@kernel.org>

-- Sebastian

> ---
>  drivers/rtc/rtc-omap.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c
> index 51e52446eacb..fa856d9c5e23 100644
> --- a/drivers/rtc/rtc-omap.c
> +++ b/drivers/rtc/rtc-omap.c
> @@ -844,7 +844,7 @@ static int omap_rtc_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static int __exit omap_rtc_remove(struct platform_device *pdev)
> +static int omap_rtc_remove(struct platform_device *pdev)
>  {
>  	struct omap_rtc *rtc = platform_get_drvdata(pdev);
>  	u8 reg;
> @@ -964,7 +964,7 @@ static void omap_rtc_shutdown(struct platform_device *pdev)
>  
>  static struct platform_driver omap_rtc_driver = {
>  	.probe		= omap_rtc_probe,
> -	.remove		= __exit_p(omap_rtc_remove),
> +	.remove		= omap_rtc_remove,
>  	.shutdown	= omap_rtc_shutdown,
>  	.driver		= {
>  		.name	= "omap_rtc",

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

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

* Re: [PATCH] rtc: omap: remove incorrect __exit markups
  2017-03-01 23:33 [PATCH] rtc: omap: remove incorrect __exit markups Dmitry Torokhov
  2017-03-02  0:13 ` Sebastian Reichel
@ 2017-03-09  0:33 ` Alexandre Belloni
  1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2017-03-09  0:33 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Alessandro Zummo, rtc-linux, linux-kernel

On 01/03/2017 at 15:33:23 -0800, Dmitry Torokhov wrote:
> Even if bus is not hot-pluggable, 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/rtc/rtc-omap.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

end of thread, other threads:[~2017-03-09  0:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-01 23:33 [PATCH] rtc: omap: remove incorrect __exit markups Dmitry Torokhov
2017-03-02  0:13 ` Sebastian Reichel
2017-03-09  0:33 ` Alexandre Belloni

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