aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight/hp680_bl.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2014-01-23 15:54:25 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-23 16:36:56 -0800
commit0561c1794a0df435631474a99c24220b9fc1bbfe (patch)
tree76844f16a57406b2ab3c8a5bf1105a2b1e966766 /drivers/video/backlight/hp680_bl.c
parentbacklight: jornada720: use devm_backlight_device_register() (diff)
downloadlinux-dev-0561c1794a0df435631474a99c24220b9fc1bbfe.tar.xz
linux-dev-0561c1794a0df435631474a99c24220b9fc1bbfe.zip
backlight: hp680_bl: use devm_backlight_device_register()
Use devm_backlight_device_register() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.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/hp680_bl.c')
-rw-r--r--drivers/video/backlight/hp680_bl.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/video/backlight/hp680_bl.c b/drivers/video/backlight/hp680_bl.c
index 00076ecfe9b8..8ea42b8d9bc8 100644
--- a/drivers/video/backlight/hp680_bl.c
+++ b/drivers/video/backlight/hp680_bl.c
@@ -110,8 +110,8 @@ static int hp680bl_probe(struct platform_device *pdev)
memset(&props, 0, sizeof(struct backlight_properties));
props.type = BACKLIGHT_RAW;
props.max_brightness = HP680_MAX_INTENSITY;
- bd = backlight_device_register("hp680-bl", &pdev->dev, NULL,
- &hp680bl_ops, &props);
+ bd = devm_backlight_device_register(&pdev->dev, "hp680-bl", &pdev->dev,
+ NULL, &hp680bl_ops, &props);
if (IS_ERR(bd))
return PTR_ERR(bd);
@@ -131,8 +131,6 @@ static int hp680bl_remove(struct platform_device *pdev)
bd->props.power = 0;
hp680bl_send_intensity(bd);
- backlight_device_unregister(bd);
-
return 0;
}