]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
backlight: jornada720: use devm_lcd_device_register()
authorJingoo Han <jg1.han@samsung.com>
Thu, 23 Jan 2014 23:54:29 +0000 (15:54 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 24 Jan 2014 00:36:56 +0000 (16:36 -0800)
Use devm_lcd_device_register() to make cleanup paths simpler,
and remove unnecessary remove().

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>
drivers/video/backlight/jornada720_lcd.c

index b061413f1a65c8968ef47542623c6d7f3a6028af..da3876c9b3ae70465b887838958687c7fd2a9675 100644 (file)
@@ -100,7 +100,8 @@ static int jornada_lcd_probe(struct platform_device *pdev)
        struct lcd_device *lcd_device;
        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)) {
                ret = PTR_ERR(lcd_device);
@@ -119,18 +120,8 @@ static int jornada_lcd_probe(struct platform_device *pdev)
        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 = {
        .probe  = jornada_lcd_probe,
-       .remove = jornada_lcd_remove,
        .driver = {
                .name   = "jornada_lcd",
        },