drivers/power: add missing sysfs_remove_group() in pcf50633_mbc_remove()
PATCH 1/1 drivers/power: add missing sysfs_remove_group() in pcf50633_mbc_remove()
sysfs entries should be removed when unload the module.
Signed-off-by Axel Lin <[email protected]>
--- drivers/power/pcf50633-charger.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/power/pcf50633-charger.c +1 -0
@@ -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);
Signature · 1 line
1.7.2
Anton Vorontsov
AppliedQuoted 3 lines · Axel Lin
sysfs entries should be removed when unload the module.
Signed-off-by Axel Lin <[email protected]>
Applied, thanks!
Quoted 16 lines
--- drivers/power/pcf50633-charger.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)drivers/power/pcf50633-charger.c +1
-0@@ -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);
Signature · 3 lines
Anton Vorontsov email: [email protected] irc://irc.freenode.net/bd2
Quoted 2 lines · On Wed, 22 Sep 2010 16:16:58 +0400 Anton Vorontsov <[email protected]>…
Quoted 1 line · Axel Lin
sysfs entries should be removed when unload the module.
I suspect this patch fixes a kernel crash, yes?
Quoted 3 lines
Quoted 1 line
Signed-off-by Axel Lin <[email protected]>Applied, thanks!
Please consider backporting it into earlier kernels too. Preferably done by adding a Cc: <[email protected]> to the changelog.