Skip to content

Commit

Permalink
mfd: Fix resource reclaim in pcf50633_remove()
Browse files Browse the repository at this point in the history
Calling sysfs_remove_group() to remove sysfs entries
and unregister bl_pdev in pcf50633_remove().

Signed-off-by: Axel Lin <[email protected]>
Acked-by: Harald Welte <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
  • Loading branch information
AxelLin authored and Samuel Ortiz committed Oct 28, 2010
1 parent bf56f0a commit 8220fe4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/mfd/pcf50633-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 8220fe4

Please sign in to comment.