LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] mfd: tps65010: remove incorrect __exit markups
@ 2015-03-09 17:47 Dmitry Torokhov
  2015-04-06 18:24 ` Dmitry Torokhov
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Torokhov @ 2015-03-09 17:47 UTC (permalink / raw)
  To: Lee Jones; +Cc: Samuel Ortiz, 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/tps65010.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/tps65010.c b/drivers/mfd/tps65010.c
index 743fb52..448f0a1 100644
--- a/drivers/mfd/tps65010.c
+++ b/drivers/mfd/tps65010.c
@@ -515,7 +515,7 @@ static int tps65010_gpio_get(struct gpio_chip *chip, unsigned offset)
 
 static struct tps65010 *the_tps;
 
-static int __exit tps65010_remove(struct i2c_client *client)
+static int tps65010_remove(struct i2c_client *client)
 {
 	struct tps65010		*tps = i2c_get_clientdata(client);
 	struct tps65010_board	*board = dev_get_platdata(&client->dev);
@@ -684,7 +684,7 @@ static struct i2c_driver tps65010_driver = {
 		.name	= "tps65010",
 	},
 	.probe	= tps65010_probe,
-	.remove	= __exit_p(tps65010_remove),
+	.remove	= tps65010_remove,
 	.id_table = tps65010_id,
 };
 
-- 
2.2.0.rc0.207.ga3a616c


-- 
Dmitry

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

* Re: [PATCH] mfd: tps65010: remove incorrect __exit markups
  2015-03-09 17:47 [PATCH] mfd: tps65010: remove incorrect __exit markups Dmitry Torokhov
@ 2015-04-06 18:24 ` Dmitry Torokhov
  2015-04-07  6:55   ` Lee Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Torokhov @ 2015-04-06 18:24 UTC (permalink / raw)
  To: Lee Jones; +Cc: Samuel Ortiz, linux-kernel

Hi Lee,

On Mon, Mar 09, 2015 at 10:47:15AM -0700, 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>

*ping*

Thanks.

> ---
>  drivers/mfd/tps65010.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mfd/tps65010.c b/drivers/mfd/tps65010.c
> index 743fb52..448f0a1 100644
> --- a/drivers/mfd/tps65010.c
> +++ b/drivers/mfd/tps65010.c
> @@ -515,7 +515,7 @@ static int tps65010_gpio_get(struct gpio_chip *chip, unsigned offset)
>  
>  static struct tps65010 *the_tps;
>  
> -static int __exit tps65010_remove(struct i2c_client *client)
> +static int tps65010_remove(struct i2c_client *client)
>  {
>  	struct tps65010		*tps = i2c_get_clientdata(client);
>  	struct tps65010_board	*board = dev_get_platdata(&client->dev);
> @@ -684,7 +684,7 @@ static struct i2c_driver tps65010_driver = {
>  		.name	= "tps65010",
>  	},
>  	.probe	= tps65010_probe,
> -	.remove	= __exit_p(tps65010_remove),
> +	.remove	= tps65010_remove,
>  	.id_table = tps65010_id,
>  };
>  
> -- 
> 2.2.0.rc0.207.ga3a616c
> 
> 
> -- 
> Dmitry

-- 
Dmitry

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

* Re: [PATCH] mfd: tps65010: remove incorrect __exit markups
  2015-04-06 18:24 ` Dmitry Torokhov
@ 2015-04-07  6:55   ` Lee Jones
  0 siblings, 0 replies; 3+ messages in thread
From: Lee Jones @ 2015-04-07  6:55 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Samuel Ortiz, linux-kernel

On Mon, 06 Apr 2015, Dmitry Torokhov wrote:

> Hi Lee,
> 
> On Mon, Mar 09, 2015 at 10:47:15AM -0700, 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>
> 
> *ping*

Please don't 'ping', that's what [RESEND] is for.

... but because I don't have any children and I'm not very good at
teaching lessons the 'hard way', I'm going to apply this anyway. :)

> > ---
> >  drivers/mfd/tps65010.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/mfd/tps65010.c b/drivers/mfd/tps65010.c
> > index 743fb52..448f0a1 100644
> > --- a/drivers/mfd/tps65010.c
> > +++ b/drivers/mfd/tps65010.c
> > @@ -515,7 +515,7 @@ static int tps65010_gpio_get(struct gpio_chip *chip, unsigned offset)
> >  
> >  static struct tps65010 *the_tps;
> >  
> > -static int __exit tps65010_remove(struct i2c_client *client)
> > +static int tps65010_remove(struct i2c_client *client)
> >  {
> >  	struct tps65010		*tps = i2c_get_clientdata(client);
> >  	struct tps65010_board	*board = dev_get_platdata(&client->dev);
> > @@ -684,7 +684,7 @@ static struct i2c_driver tps65010_driver = {
> >  		.name	= "tps65010",
> >  	},
> >  	.probe	= tps65010_probe,
> > -	.remove	= __exit_p(tps65010_remove),
> > +	.remove	= tps65010_remove,
> >  	.id_table = tps65010_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-04-07  6:55 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:47 [PATCH] mfd: tps65010: remove incorrect __exit markups Dmitry Torokhov
2015-04-06 18:24 ` Dmitry Torokhov
2015-04-07  6:55   ` 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).