static int adp8870_remove(struct i2c_client *client) { struct adp8870_bl *data = i2c_get_clientdata(client); adp8870_clr_bits(client, ADP8870_MDCR, NSTBY); if (data->led) adp8870_led_remove(client); if (data->pdata->en_ambl_sens) sysfs_remove_group(&data->bl->dev.kobj, &adp8870_bl_attr_group); return 0; }
static int __devexit adp8870_remove(struct i2c_client *client) { struct adp8870_bl *data = i2c_get_clientdata(client); adp8870_clr_bits(client, ADP8870_MDCR, NSTBY); if (data->led) adp8870_led_remove(client); if (data->pdata->en_ambl_sens) sysfs_remove_group(&data->bl->dev.kobj, &adp8870_bl_attr_group); backlight_device_unregister(data->bl); kfree(data); return 0; }