diff options
author | Milo(Woogyom) Kim <milo.kim@ti.com> | 2013-02-05 18:58:35 +0900 |
---|---|---|
committer | Bryan Wu <cooloney@gmail.com> | 2013-02-06 15:59:27 -0800 |
commit | 22ebeb488b3dbbb64b81146b366551107ae34af8 (patch) | |
tree | 74eef8d5dcbc48c39b5452560bda094a0e8718ea /drivers/leds/leds-lp5521.c | |
parent | ffbdccdbbaee814963a09d25b1cc598cfe131366 (diff) |
leds-lp55xx: clean up init function
lp5521/5523_init_device() are replaced with lp55xx common function,
lp55xx_init_device().
Error handler in init_device:
deinit function are matched with 'err_post_init' section in
lp55xx_init_device().
Remove LP5523 engine intialization code:
Engine functionality is not mandatory but optional.
Moreover engine initialization is done internally with device reset command.
Therefore, this code is unnecessary.
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'drivers/leds/leds-lp5521.c')
-rw-r--r-- | drivers/leds/leds-lp5521.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c index faab44900c2..74dc208fb99 100644 --- a/drivers/leds/leds-lp5521.c +++ b/drivers/leds/leds-lp5521.c @@ -689,26 +689,6 @@ static void lp5521_unregister_sysfs(struct i2c_client *client) &lp5521_led_attribute_group); } -static void lp5521_deinit_device(struct lp5521_chip *chip); -static int lp5521_init_device(struct lp5521_chip *chip) -{ - struct i2c_client *client = chip->client; - struct lp55xx_chip *temp; - int ret; - - ret = lp5521_post_init_device(temp); - if (ret < 0) { - dev_err(&client->dev, "error configuring chip\n"); - goto err_config; - } - - return 0; - -err_config: - lp5521_deinit_device(chip); - return ret; -} - static void lp5521_deinit_device(struct lp5521_chip *chip) { struct lp5521_platform_data *pdata = chip->pdata; @@ -860,7 +840,7 @@ static int lp5521_probe(struct i2c_client *client, i2c_set_clientdata(client, led); - ret = lp5521_init_device(old_chip); + ret = lp55xx_init_device(chip); if (ret) goto err_init; |