diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-11-12 18:09:12 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-12 22:09:17 -0500 |
commit | 26faf15cc650c6f30687c3e3c22d480bb1e3542b (patch) | |
tree | 1de2e6cc9c9457f40a0c8fe674c64f74dea53972 /drivers/video/backlight/bd6107.c | |
parent | 3e61c73c52443b98a587a0db70a7ebf417de34f6 (diff) |
backlight: bd6107: use devm_backlight_device_register()
Use devm_backlight_device_register() to make cleanup paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/backlight/bd6107.c')
-rw-r--r-- | drivers/video/backlight/bd6107.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/backlight/bd6107.c b/drivers/video/backlight/bd6107.c index 43c434e7dc86..16dd9bc625bd 100644 --- a/drivers/video/backlight/bd6107.c +++ b/drivers/video/backlight/bd6107.c | |||
@@ -166,7 +166,8 @@ static int bd6107_probe(struct i2c_client *client, | |||
166 | props.brightness = clamp_t(unsigned int, pdata->def_value, 0, | 166 | props.brightness = clamp_t(unsigned int, pdata->def_value, 0, |
167 | props.max_brightness); | 167 | props.max_brightness); |
168 | 168 | ||
169 | backlight = backlight_device_register(dev_name(&client->dev), | 169 | backlight = devm_backlight_device_register(&client->dev, |
170 | dev_name(&client->dev), | ||
170 | &bd->client->dev, bd, | 171 | &bd->client->dev, bd, |
171 | &bd6107_backlight_ops, &props); | 172 | &bd6107_backlight_ops, &props); |
172 | if (IS_ERR(backlight)) { | 173 | if (IS_ERR(backlight)) { |
@@ -186,7 +187,6 @@ static int bd6107_remove(struct i2c_client *client) | |||
186 | 187 | ||
187 | backlight->props.brightness = 0; | 188 | backlight->props.brightness = 0; |
188 | backlight_update_status(backlight); | 189 | backlight_update_status(backlight); |
189 | backlight_device_unregister(backlight); | ||
190 | 190 | ||
191 | return 0; | 191 | return 0; |
192 | } | 192 | } |