diff options
Diffstat (limited to 'drivers/leds/leds-lp5523.c')
-rw-r--r-- | drivers/leds/leds-lp5523.c | 16 |
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) | |||
872 | } | 872 | } |
873 | } | 873 | } |
874 | 874 | ||
875 | static void lp5523_deinit_device(struct lp5523_chip *chip) | ||
876 | { | ||
877 | struct lp5523_platform_data *pdata = chip->pdata; | ||
878 | |||
879 | if (pdata->enable) | ||
880 | pdata->enable(0); | ||
881 | if (pdata->release_resources) | ||
882 | pdata->release_resources(); | ||
883 | } | ||
884 | |||
885 | /* Chip specific configurations */ | 875 | /* Chip specific configurations */ |
886 | static struct lp55xx_device_config lp5523_cfg = { | 876 | static struct lp55xx_device_config lp5523_cfg = { |
887 | .reset = { | 877 | .reset = { |
@@ -944,7 +934,7 @@ static int lp5523_probe(struct i2c_client *client, | |||
944 | return ret; | 934 | return ret; |
945 | fail2: | 935 | fail2: |
946 | lp5523_unregister_leds(old_chip); | 936 | lp5523_unregister_leds(old_chip); |
947 | lp5523_deinit_device(old_chip); | 937 | lp55xx_deinit_device(chip); |
948 | err_init: | 938 | err_init: |
949 | return ret; | 939 | return ret; |
950 | } | 940 | } |
@@ -952,6 +942,8 @@ err_init: | |||
952 | static int lp5523_remove(struct i2c_client *client) | 942 | static int lp5523_remove(struct i2c_client *client) |
953 | { | 943 | { |
954 | struct lp5523_chip *old_chip = i2c_get_clientdata(client); | 944 | struct lp5523_chip *old_chip = i2c_get_clientdata(client); |
945 | struct lp55xx_led *led = i2c_get_clientdata(client); | ||
946 | struct lp55xx_chip *chip = led->chip; | ||
955 | 947 | ||
956 | /* Disable engine mode */ | 948 | /* Disable engine mode */ |
957 | lp5523_write(client, LP5523_REG_OP_MODE, LP5523_CMD_DISABLED); | 949 | lp5523_write(client, LP5523_REG_OP_MODE, LP5523_CMD_DISABLED); |
@@ -959,8 +951,8 @@ static int lp5523_remove(struct i2c_client *client) | |||
959 | lp5523_unregister_sysfs(client); | 951 | lp5523_unregister_sysfs(client); |
960 | 952 | ||
961 | lp5523_unregister_leds(old_chip); | 953 | lp5523_unregister_leds(old_chip); |
954 | lp55xx_deinit_device(chip); | ||
962 | 955 | ||
963 | lp5523_deinit_device(old_chip); | ||
964 | return 0; | 956 | return 0; |
965 | } | 957 | } |
966 | 958 | ||