diff options
Diffstat (limited to 'drivers/leds/leds-lp55xx-common.c')
-rw-r--r-- | drivers/leds/leds-lp55xx-common.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/leds/leds-lp55xx-common.c b/drivers/leds/leds-lp55xx-common.c index c06745f160c3..bcabf2cb949a 100644 --- a/drivers/leds/leds-lp55xx-common.c +++ b/drivers/leds/leds-lp55xx-common.c | |||
@@ -152,14 +152,23 @@ int lp55xx_init_device(struct lp55xx_chip *chip) | |||
152 | return 0; | 152 | return 0; |
153 | 153 | ||
154 | err_post_init: | 154 | err_post_init: |
155 | lp55xx_deinit_device(chip); | ||
156 | err: | ||
157 | return ret; | ||
158 | } | ||
159 | EXPORT_SYMBOL_GPL(lp55xx_init_device); | ||
160 | |||
161 | void lp55xx_deinit_device(struct lp55xx_chip *chip) | ||
162 | { | ||
163 | struct lp55xx_platform_data *pdata = chip->pdata; | ||
164 | |||
155 | if (pdata->enable) | 165 | if (pdata->enable) |
156 | pdata->enable(0); | 166 | pdata->enable(0); |
167 | |||
157 | if (pdata->release_resources) | 168 | if (pdata->release_resources) |
158 | pdata->release_resources(); | 169 | pdata->release_resources(); |
159 | err: | ||
160 | return ret; | ||
161 | } | 170 | } |
162 | EXPORT_SYMBOL_GPL(lp55xx_init_device); | 171 | EXPORT_SYMBOL_GPL(lp55xx_deinit_device); |
163 | 172 | ||
164 | MODULE_AUTHOR("Milo Kim <milo.kim@ti.com>"); | 173 | MODULE_AUTHOR("Milo Kim <milo.kim@ti.com>"); |
165 | MODULE_DESCRIPTION("LP55xx Common Driver"); | 174 | MODULE_DESCRIPTION("LP55xx Common Driver"); |