Exemplo n.º 1
0
static int __devexit smb349_remove(struct i2c_client *client)
{
    const struct smb349_platform_data *pdata;
    struct smb349_struct *smb349_chg = i2c_get_clientdata(client);

    flush_work(&smb349_chg->hwinit_work);
    pdata = client->dev.platform_data;
    power_supply_unregister(&smb349_chg->dc_psy);
    gpio_free(pdata->en_n_gpio);
    gpio_free(pdata->chg_susp_gpio);
    remove_debugfs_entries(smb349_chg);
    kfree(smb349_chg);
    return 0;
}
static int __devexit isl9519q_remove(struct i2c_client *client)
{
	struct isl_platform_data *pdata;
	struct isl9519q_struct *isl_chg = i2c_get_clientdata(client);

	pdata = client->dev.platform_data;
	gpio_free(pdata->valid_n_gpio);
	free_irq(client->irq, client);
	cancel_delayed_work_sync(&isl_chg->charge_work);
	if (isl_chg->notify_by_pmic) {
		power_supply_unregister(&isl_chg->dc_psy);
	} else {
		msm_charger_notify_event(&isl_chg->adapter_hw_chg,
							CHG_REMOVED_EVENT);
	msm_charger_unregister(&isl_chg->adapter_hw_chg);
	}
	remove_debugfs_entries(isl_chg);
	the_isl_chg = NULL;
	kfree(isl_chg);
	return 0;
}