示例#1
0
文件: adp8870_bl.c 项目: 020gzh/linux
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;
}
示例#2
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;
}