From: Axel Lin Date: Wed, 20 Oct 2010 08:56:59 +0000 (+0800) Subject: mfd: Fix resource reclaim in pcf50633_remove() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8220fe4cb25d0177bd0795a516d2023799008ca0;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git mfd: Fix resource reclaim in pcf50633_remove() Calling sysfs_remove_group() to remove sysfs entries and unregister bl_pdev in pcf50633_remove(). Signed-off-by: Axel Lin Acked-by: Harald Welte Signed-off-by: Samuel Ortiz --- diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c index 6d4233f0d0d3..501ce13b693e 100644 --- a/drivers/mfd/pcf50633-core.c +++ b/drivers/mfd/pcf50633-core.c @@ -339,12 +339,14 @@ static int __devexit pcf50633_remove(struct i2c_client *client) struct pcf50633 *pcf = i2c_get_clientdata(client); int i; + sysfs_remove_group(&client->dev.kobj, &pcf_attr_group); pcf50633_irq_free(pcf); platform_device_unregister(pcf->input_pdev); platform_device_unregister(pcf->rtc_pdev); platform_device_unregister(pcf->mbc_pdev); platform_device_unregister(pcf->adc_pdev); + platform_device_unregister(pcf->bl_pdev); for (i = 0; i < PCF50633_NUM_REGULATORS; i++) platform_device_unregister(pcf->regulator_pdev[i]);