static int __exit bdata_remove(struct platform_device *pdev) { struct data_info *di = platform_get_drvdata(pdev); pr_info("%s: remove\n", SEMC_BDATA_NAME); clear_platform_callbacks(di); oem_rapi_client_close(); #ifdef DEBUG_FS semc_battery_remove_attrs(di->bdata_ps.dev); #endif power_supply_unregister(&di->bdata_ps); kfree(di); return 0; }
static int __exit bdata_remove(struct platform_device *pdev) { struct data_info *di = platform_get_drvdata(pdev); dev_info(&pdev->dev, "remove\n"); hrtimer_cancel(&di->timer); if (work_pending(&di->timer_work)) cancel_work_sync(&di->timer_work); destroy_workqueue(di->wq); semc_battery_remove_attrs(di->bdata_ps.dev); power_supply_unregister(&di->bdata_ps); kfree(di); return 0; }