public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] leds: leds-lm3530: Add __devexit_p at necessary place
@ 2011-10-05  7:54 Axel Lin
  2011-10-05 21:07 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2011-10-05  7:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: Shreshtha Kumar SAHU, Richard Purdie, Andrew Morton

According to the comments in include/linux/init.h:

"Pointers to __devexit functions must use __devexit_p(function_name), the
wrapper will insert either the function_name or NULL, depending on the config
options."

We have __devexit annotation for lm3530_remove(), thus add __devexit_p at
necessary place.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/leds/leds-lm3530.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/leds/leds-lm3530.c b/drivers/leds/leds-lm3530.c
index 15c1733..0630e4f 100644
--- a/drivers/leds/leds-lm3530.c
+++ b/drivers/leds/leds-lm3530.c
@@ -449,7 +449,7 @@ MODULE_DEVICE_TABLE(i2c, lm3530_id);
 
 static struct i2c_driver lm3530_i2c_driver = {
 	.probe = lm3530_probe,
-	.remove = lm3530_remove,
+	.remove = __devexit_p(lm3530_remove),
 	.id_table = lm3530_id,
 	.driver = {
 		.name = LM3530_NAME,
-- 
1.7.4.1




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

* Re: [PATCH] leds: leds-lm3530: Add __devexit_p at necessary place
  2011-10-05  7:54 [PATCH] leds: leds-lm3530: Add __devexit_p at necessary place Axel Lin
@ 2011-10-05 21:07 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2011-10-05 21:07 UTC (permalink / raw)
  To: Axel Lin
  Cc: linux-kernel, Shreshtha Kumar SAHU, Richard Purdie, Andrew Morton

2011/10/5 Axel Lin <axel.lin@gmail.com>:

> According to the comments in include/linux/init.h:
>
> "Pointers to __devexit functions must use __devexit_p(function_name), the
> wrapper will insert either the function_name or NULL, depending on the config
> options."
>
> We have __devexit annotation for lm3530_remove(), thus add __devexit_p at
> necessary place.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Thanks Axel,
Linus Walleij

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

end of thread, other threads:[~2011-10-05 21:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-05  7:54 [PATCH] leds: leds-lm3530: Add __devexit_p at necessary place Axel Lin
2011-10-05 21:07 ` Linus Walleij

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