Commit 964598f2 authored by Jingoo Han's avatar Jingoo Han Committed by Linus Torvalds

backlight: jornada720: use devm_lcd_device_register()

Use devm_lcd_device_register() to make cleanup paths simpler,
and remove unnecessary remove().
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ffb1f6c8
...@@ -100,7 +100,8 @@ static int jornada_lcd_probe(struct platform_device *pdev) ...@@ -100,7 +100,8 @@ static int jornada_lcd_probe(struct platform_device *pdev)
struct lcd_device *lcd_device; struct lcd_device *lcd_device;
int ret; int ret;
lcd_device = lcd_device_register(S1D_DEVICENAME, &pdev->dev, NULL, &jornada_lcd_props); lcd_device = devm_lcd_device_register(&pdev->dev, S1D_DEVICENAME,
&pdev->dev, NULL, &jornada_lcd_props);
if (IS_ERR(lcd_device)) { if (IS_ERR(lcd_device)) {
ret = PTR_ERR(lcd_device); ret = PTR_ERR(lcd_device);
...@@ -119,18 +120,8 @@ static int jornada_lcd_probe(struct platform_device *pdev) ...@@ -119,18 +120,8 @@ static int jornada_lcd_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int jornada_lcd_remove(struct platform_device *pdev)
{
struct lcd_device *lcd_device = platform_get_drvdata(pdev);
lcd_device_unregister(lcd_device);
return 0;
}
static struct platform_driver jornada_lcd_driver = { static struct platform_driver jornada_lcd_driver = {
.probe = jornada_lcd_probe, .probe = jornada_lcd_probe,
.remove = jornada_lcd_remove,
.driver = { .driver = {
.name = "jornada_lcd", .name = "jornada_lcd",
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment