Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <axel.lin@gmail.com>
Acked-by: Harald Welte <laforge@gnumonks.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

authored by

Axel Lin and committed by
Samuel Ortiz
8220fe4c bf56f0a6

+2
+2
drivers/mfd/pcf50633-core.c
··· 339 339 struct pcf50633 *pcf = i2c_get_clientdata(client); 340 340 int i; 341 341 342 + sysfs_remove_group(&client->dev.kobj, &pcf_attr_group); 342 343 pcf50633_irq_free(pcf); 343 344 344 345 platform_device_unregister(pcf->input_pdev); 345 346 platform_device_unregister(pcf->rtc_pdev); 346 347 platform_device_unregister(pcf->mbc_pdev); 347 348 platform_device_unregister(pcf->adc_pdev); 349 + platform_device_unregister(pcf->bl_pdev); 348 350 349 351 for (i = 0; i < PCF50633_NUM_REGULATORS; i++) 350 352 platform_device_unregister(pcf->regulator_pdev[i]);