mfd: Fix resource reclaim in pcf50633_remove()
authorAxel Lin <axel.lin@gmail.com>
Wed, 20 Oct 2010 08:56:59 +0000 (16:56 +0800)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 28 Oct 2010 22:30:34 +0000 (00:30 +0200)
Calling sysfs_remove_group() to remove sysfs entries
and unregister bl_pdev in pcf50633_remove().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Harald Welte <laforge@gnumonks.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/pcf50633-core.c

index 6d4233f0d0d316279d7b98a4b43314a4365d03f7..501ce13b693ea8b105d9fe1c06d4be7e27140943 100644 (file)
@@ -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]);