[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <005201ceb906$88f0fc40$9ad2f4c0$%han@samsung.com>
Date: Tue, 24 Sep 2013 18:14:55 +0900
From: Jingoo Han <jg1.han@...sung.com>
To: 'Andrew Morton' <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, 'Richard Purdie' <rpurdie@...ys.net>,
'Jingoo Han' <jg1.han@...sung.com>
Subject: [PATCH 12/22] 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@...sung.com>
---
drivers/video/backlight/generic_bl.c | 6 ++----
1 file 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;
}
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists