LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] mfd: menelaus: rmove incorrect __exit markups
@ 2015-03-09 17:49 Dmitry Torokhov
  2015-03-09 17:54 ` Tony Lindgren
  2015-03-10 15:13 ` Lee Jones
  0 siblings, 2 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2015-03-09 17:49 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Samuel Ortiz, Lee Jones, linux-omap, 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/mfd/menelaus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c
index 9f01aef..5269ff2 100644
--- a/drivers/mfd/menelaus.c
+++ b/drivers/mfd/menelaus.c
@@ -1259,7 +1259,7 @@ fail:
 	return err;
 }
 
-static int __exit menelaus_remove(struct i2c_client *client)
+static int menelaus_remove(struct i2c_client *client)
 {
 	struct menelaus_chip	*menelaus = i2c_get_clientdata(client);
 
@@ -1280,7 +1280,7 @@ static struct i2c_driver menelaus_i2c_driver = {
 		.name		= DRIVER_NAME,
 	},
 	.probe		= menelaus_probe,
-	.remove		= __exit_p(menelaus_remove),
+	.remove		= menelaus_remove,
 	.id_table	= menelaus_id,
 };
 
-- 
2.2.0.rc0.207.ga3a616c


-- 
Dmitry

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

* Re: [PATCH] mfd: menelaus: rmove incorrect __exit markups
  2015-03-09 17:49 [PATCH] mfd: menelaus: rmove incorrect __exit markups Dmitry Torokhov
@ 2015-03-09 17:54 ` Tony Lindgren
  2015-03-10 15:13 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2015-03-09 17:54 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Samuel Ortiz, Lee Jones, linux-omap, linux-kernel

* Dmitry Torokhov <dmitry.torokhov@gmail.com> [150309 10:49]:
> 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>

Acked-by: Tony Lindgren <tony@atomide.com>

> ---
>  drivers/mfd/menelaus.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c
> index 9f01aef..5269ff2 100644
> --- a/drivers/mfd/menelaus.c
> +++ b/drivers/mfd/menelaus.c
> @@ -1259,7 +1259,7 @@ fail:
>  	return err;
>  }
>  
> -static int __exit menelaus_remove(struct i2c_client *client)
> +static int menelaus_remove(struct i2c_client *client)
>  {
>  	struct menelaus_chip	*menelaus = i2c_get_clientdata(client);
>  
> @@ -1280,7 +1280,7 @@ static struct i2c_driver menelaus_i2c_driver = {
>  		.name		= DRIVER_NAME,
>  	},
>  	.probe		= menelaus_probe,
> -	.remove		= __exit_p(menelaus_remove),
> +	.remove		= menelaus_remove,
>  	.id_table	= menelaus_id,
>  };
>  
> -- 
> 2.2.0.rc0.207.ga3a616c
> 
> 
> -- 
> Dmitry

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

* Re: [PATCH] mfd: menelaus: rmove incorrect __exit markups
  2015-03-09 17:49 [PATCH] mfd: menelaus: rmove incorrect __exit markups Dmitry Torokhov
  2015-03-09 17:54 ` Tony Lindgren
@ 2015-03-10 15:13 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2015-03-10 15:13 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Tony Lindgren, Samuel Ortiz, linux-omap, linux-kernel

On Mon, 09 Mar 2015, 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>
> ---
>  drivers/mfd/menelaus.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c
> index 9f01aef..5269ff2 100644
> --- a/drivers/mfd/menelaus.c
> +++ b/drivers/mfd/menelaus.c
> @@ -1259,7 +1259,7 @@ fail:
>  	return err;
>  }
>  
> -static int __exit menelaus_remove(struct i2c_client *client)
> +static int menelaus_remove(struct i2c_client *client)
>  {
>  	struct menelaus_chip	*menelaus = i2c_get_clientdata(client);
>  
> @@ -1280,7 +1280,7 @@ static struct i2c_driver menelaus_i2c_driver = {
>  		.name		= DRIVER_NAME,
>  	},
>  	.probe		= menelaus_probe,
> -	.remove		= __exit_p(menelaus_remove),
> +	.remove		= menelaus_remove,
>  	.id_table	= menelaus_id,
>  };
>  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-09 17:49 [PATCH] mfd: menelaus: rmove incorrect __exit markups Dmitry Torokhov
2015-03-09 17:54 ` Tony Lindgren
2015-03-10 15:13 ` Lee Jones

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).