summaryrefslogtreecommitdiff
path: root/drivers/video/backlight/bd6107.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-11-12 15:09:12 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-13 12:09:17 +0900
commit26faf15cc650c6f30687c3e3c22d480bb1e3542b (patch)
tree1de2e6cc9c9457f40a0c8fe674c64f74dea53972 /drivers/video/backlight/bd6107.c
parent3e61c73c52443b98a587a0db70a7ebf417de34f6 (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.c4
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,
props.brightness = clamp_t(unsigned int, pdata->def_value, 0,
props.max_brightness);
- backlight = backlight_device_register(dev_name(&client->dev),
+ backlight = devm_backlight_device_register(&client->dev,
+ dev_name(&client->dev),
&bd->client->dev, bd,
&bd6107_backlight_ops, &props);
if (IS_ERR(backlight)) {
@@ -186,7 +187,6 @@ static int bd6107_remove(struct i2c_client *client)
backlight->props.brightness = 0;
backlight_update_status(backlight);
- backlight_device_unregister(backlight);
return 0;
}