]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
leds: leds-ipaq-micro: Use devm_led_classdev_register
authorMuhammad Falak R Wani <falakreyaz@gmail.com>
Mon, 7 Sep 2015 14:13:23 +0000 (19:43 +0530)
committerJacek Anaszewski <j.anaszewski@samsung.com>
Tue, 3 Nov 2015 07:59:15 +0000 (08:59 +0100)
Use of resource-managed function devm_led_classdev_register
instead of led_classdev_register is preferred, consequently
remove redundant function micro_leds_remove.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
drivers/leds/leds-ipaq-micro.c

index 3776f516cd88f80541affad80ce4dcb25963152c..1206215822d72071fcdfc7e045b62f41d80a5ebb 100644 (file)
@@ -111,7 +111,7 @@ static int micro_leds_probe(struct platform_device *pdev)
 {
        int ret;
 
-       ret = led_classdev_register(&pdev->dev, &micro_led);
+       ret = devm_led_classdev_register(&pdev->dev, &micro_led);
        if (ret) {
                dev_err(&pdev->dev, "registering led failed: %d\n", ret);
                return ret;
@@ -121,18 +121,11 @@ static int micro_leds_probe(struct platform_device *pdev)
        return 0;
 }
 
-static int micro_leds_remove(struct platform_device *pdev)
-{
-       led_classdev_unregister(&micro_led);
-       return 0;
-}
-
 static struct platform_driver micro_leds_device_driver = {
        .driver = {
                .name    = "ipaq-micro-leds",
        },
        .probe   = micro_leds_probe,
-       .remove  = micro_leds_remove,
 };
 module_platform_driver(micro_leds_device_driver);