wm97xx_battery.c (1ac731c529cd4d6adbce134754b51ff7d822b145) | wm97xx_battery.c (6f9fb8afe649a24c7df50ce2f7095b832713e648) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Battery measurement code for WM97xx 4 * 5 * based on tosa_battery.c 6 * 7 * Copyright (C) 2008 Marek Vasut <marek.vasut@gmail.com> 8 */ --- 234 unchanged lines hidden (view full) --- 243err4: 244 kfree(prop); 245err3: 246 if (charge_gpiod) 247 free_irq(gpiod_to_irq(charge_gpiod), dev); 248 return ret; 249} 250 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Battery measurement code for WM97xx 4 * 5 * based on tosa_battery.c 6 * 7 * Copyright (C) 2008 Marek Vasut <marek.vasut@gmail.com> 8 */ --- 234 unchanged lines hidden (view full) --- 243err4: 244 kfree(prop); 245err3: 246 if (charge_gpiod) 247 free_irq(gpiod_to_irq(charge_gpiod), dev); 248 return ret; 249} 250 |
251static int wm97xx_bat_remove(struct platform_device *dev) | 251static void wm97xx_bat_remove(struct platform_device *dev) |
252{ 253 if (charge_gpiod) 254 free_irq(gpiod_to_irq(charge_gpiod), dev); 255 cancel_work_sync(&bat_work); 256 power_supply_unregister(bat_psy); 257 kfree(prop); | 252{ 253 if (charge_gpiod) 254 free_irq(gpiod_to_irq(charge_gpiod), dev); 255 cancel_work_sync(&bat_work); 256 power_supply_unregister(bat_psy); 257 kfree(prop); |
258 return 0; | |
259} 260 261static struct platform_driver wm97xx_bat_driver = { 262 .driver = { 263 .name = "wm97xx-battery", 264#ifdef CONFIG_PM 265 .pm = &wm97xx_bat_pm_ops, 266#endif 267 }, 268 .probe = wm97xx_bat_probe, | 258} 259 260static struct platform_driver wm97xx_bat_driver = { 261 .driver = { 262 .name = "wm97xx-battery", 263#ifdef CONFIG_PM 264 .pm = &wm97xx_bat_pm_ops, 265#endif 266 }, 267 .probe = wm97xx_bat_probe, |
269 .remove = wm97xx_bat_remove, | 268 .remove_new = wm97xx_bat_remove, |
270}; 271 272module_platform_driver(wm97xx_bat_driver); 273 274MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>"); 275MODULE_DESCRIPTION("WM97xx battery driver"); | 269}; 270 271module_platform_driver(wm97xx_bat_driver); 272 273MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>"); 274MODULE_DESCRIPTION("WM97xx battery driver"); |