pcf50633-charger: Add missing sysfs_remove_group()
authorAxel Lin <axel.lin@gmail.com>
Tue, 21 Sep 2010 08:35:57 +0000 (16:35 +0800)
committerAnton Vorontsov <cbouatmailru@gmail.com>
Wed, 22 Sep 2010 12:14:49 +0000 (16:14 +0400)
sysfs entries should be removed when unload the module.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
drivers/power/pcf50633-charger.c

index 066f994e6fe5ac4b74dda65ba658450b283cbe9f..4fa52e1781a225e5bad152a6dd9a6c5e76752503 100644 (file)
@@ -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);