summaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-lp5523.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/leds/leds-lp5523.c')
-rw-r--r--drivers/leds/leds-lp5523.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c
index 80b7fb4a3ad6..3f506e3d4986 100644
--- a/drivers/leds/leds-lp5523.c
+++ b/drivers/leds/leds-lp5523.c
@@ -872,16 +872,6 @@ static void lp5523_unregister_leds(struct lp5523_chip *chip)
}
}
-static void lp5523_deinit_device(struct lp5523_chip *chip)
-{
- struct lp5523_platform_data *pdata = chip->pdata;
-
- if (pdata->enable)
- pdata->enable(0);
- if (pdata->release_resources)
- pdata->release_resources();
-}
-
/* Chip specific configurations */
static struct lp55xx_device_config lp5523_cfg = {
.reset = {
@@ -944,7 +934,7 @@ static int lp5523_probe(struct i2c_client *client,
return ret;
fail2:
lp5523_unregister_leds(old_chip);
- lp5523_deinit_device(old_chip);
+ lp55xx_deinit_device(chip);
err_init:
return ret;
}
@@ -952,6 +942,8 @@ err_init:
static int lp5523_remove(struct i2c_client *client)
{
struct lp5523_chip *old_chip = i2c_get_clientdata(client);
+ struct lp55xx_led *led = i2c_get_clientdata(client);
+ struct lp55xx_chip *chip = led->chip;
/* Disable engine mode */
lp5523_write(client, LP5523_REG_OP_MODE, LP5523_CMD_DISABLED);
@@ -959,8 +951,8 @@ static int lp5523_remove(struct i2c_client *client)
lp5523_unregister_sysfs(client);
lp5523_unregister_leds(old_chip);
+ lp55xx_deinit_device(chip);
- lp5523_deinit_device(old_chip);
return 0;
}