diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-11-12 15:09:15 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-13 12:09:17 +0900 |
commit | de2efd2a9ffba56eb0c00a48346685baa377c370 (patch) | |
tree | bc115cfd0f3b1161a5083e0faa585bc6317c63f1 /drivers/video/backlight | |
parent | 23741ada20103cda6a39fad9eb0171757ef997ff (diff) | |
download | op-kernel-dev-de2efd2a9ffba56eb0c00a48346685baa377c370.zip op-kernel-dev-de2efd2a9ffba56eb0c00a48346685baa377c370.tar.gz |
backlight: generic_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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/backlight')
-rw-r--r-- | drivers/video/backlight/generic_bl.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/video/backlight/generic_bl.c b/drivers/video/backlight/generic_bl.c index 48fa914..5d8d652 100644 --- a/drivers/video/backlight/generic_bl.c +++ b/drivers/video/backlight/generic_bl.c @@ -93,8 +93,8 @@ static int genericbl_probe(struct platform_device *pdev) memset(&props, 0, sizeof(struct backlight_properties)); props.type = BACKLIGHT_RAW; props.max_brightness = machinfo->max_intensity; - bd = backlight_device_register(name, &pdev->dev, NULL, &genericbl_ops, - &props); + bd = devm_backlight_device_register(&pdev->dev, name, &pdev->dev, + NULL, &genericbl_ops, &props); if (IS_ERR(bd)) return PTR_ERR(bd); @@ -118,8 +118,6 @@ static int genericbl_remove(struct platform_device *pdev) bd->props.brightness = 0; backlight_update_status(bd); - backlight_device_unregister(bd); - dev_info(&pdev->dev, "Generic Backlight Driver Unloaded\n"); return 0; } |