* [PATCH] drivers/power: add missing sysfs_remove_group() in pcf50633_mbc_remove()
@ 2010-09-21 8:35 Axel Lin
2010-09-22 12:18 ` Anton Vorontsov
0 siblings, 1 reply; 3+ messages in thread
From: Axel Lin @ 2010-09-21 8:35 UTC (permalink / raw)
To: linux-kernel; +Cc: Balaji Rao, Anton Vorontsov, Paul Fertser
sysfs entries should be removed when unload the module.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/power/pcf50633-charger.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/power/pcf50633-charger.c b/drivers/power/pcf50633-charger.c
index 066f994..4fa52e1 100644
--- a/drivers/power/pcf50633-charger.c
+++ b/drivers/power/pcf50633-charger.c
@@ -456,6 +456,7 @@ static int __devexit pcf50633_mbc_remove(struct platform_device *pdev)
for (i = 0; i < ARRAY_SIZE(mbc_irq_handlers); i++)
pcf50633_free_irq(mbc->pcf, mbc_irq_handlers[i]);
+ sysfs_remove_group(&pdev->dev.kobj, &mbc_attr_group);
power_supply_unregister(&mbc->usb);
power_supply_unregister(&mbc->adapter);
power_supply_unregister(&mbc->ac);
--
1.7.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drivers/power: add missing sysfs_remove_group() in pcf50633_mbc_remove()
2010-09-21 8:35 [PATCH] drivers/power: add missing sysfs_remove_group() in pcf50633_mbc_remove() Axel Lin
@ 2010-09-22 12:18 ` Anton Vorontsov
2010-09-23 22:01 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Anton Vorontsov @ 2010-09-22 12:18 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, Balaji Rao, Paul Fertser
On Tue, Sep 21, 2010 at 04:35:57PM +0800, Axel Lin wrote:
> sysfs entries should be removed when unload the module.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
Applied, thanks!
> ---
> drivers/power/pcf50633-charger.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/power/pcf50633-charger.c b/drivers/power/pcf50633-charger.c
> index 066f994..4fa52e1 100644
> --- a/drivers/power/pcf50633-charger.c
> +++ b/drivers/power/pcf50633-charger.c
> @@ -456,6 +456,7 @@ static int __devexit pcf50633_mbc_remove(struct platform_device *pdev)
> for (i = 0; i < ARRAY_SIZE(mbc_irq_handlers); i++)
> pcf50633_free_irq(mbc->pcf, mbc_irq_handlers[i]);
>
> + sysfs_remove_group(&pdev->dev.kobj, &mbc_attr_group);
> power_supply_unregister(&mbc->usb);
> power_supply_unregister(&mbc->adapter);
> power_supply_unregister(&mbc->ac);
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drivers/power: add missing sysfs_remove_group() in pcf50633_mbc_remove()
2010-09-22 12:18 ` Anton Vorontsov
@ 2010-09-23 22:01 ` Andrew Morton
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2010-09-23 22:01 UTC (permalink / raw)
To: Anton Vorontsov; +Cc: Axel Lin, linux-kernel, Balaji Rao, Paul Fertser
On Wed, 22 Sep 2010 16:16:58 +0400
Anton Vorontsov <cbouatmailru@gmail.com> wrote:
> On Tue, Sep 21, 2010 at 04:35:57PM +0800, Axel Lin wrote:
> > sysfs entries should be removed when unload the module.
I suspect this patch fixes a kernel crash, yes?
> > Signed-off-by: Axel Lin <axel.lin@gmail.com>
>
> Applied, thanks!
Please consider backporting it into earlier kernels too. Preferably done
by adding a Cc: <stable@kernel.org> to the changelog.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-09-23 22:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-21 8:35 [PATCH] drivers/power: add missing sysfs_remove_group() in pcf50633_mbc_remove() Axel Lin
2010-09-22 12:18 ` Anton Vorontsov
2010-09-23 22:01 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox