diff options
author | Milo(Woogyom) Kim <milo.kim@ti.com> | 2013-02-05 05:03:02 -0500 |
---|---|---|
committer | Bryan Wu <cooloney@gmail.com> | 2013-02-06 18:59:27 -0500 |
commit | 6ce6176263393dd80b9a537c1e1462b8529f240b (patch) | |
tree | 9e96351d63c51119625d09d0f3df61376c803367 /drivers/leds/leds-lp55xx-common.c | |
parent | 22ebeb488b3dbbb64b81146b366551107ae34af8 (diff) |
leds-lp55xx: use lp55xx common deinit function
Two separate de-init functions are merged into one common function.
And it is used in err_post_init of lp55xx_init_device().
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
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"); |