Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8220fe4c authored by Axel Lin's avatar Axel Lin Committed by Samuel Ortiz
Browse files

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: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarHarald Welte <laforge@gnumonks.org>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent bf56f0a6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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]);