Commit 431557f4 authored by Muhammad Falak R Wani's avatar Muhammad Falak R Wani Committed by Jacek Anaszewski

leds: leds-ipaq-micro: Use devm_led_classdev_register

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: default avatarMuhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: default avatarJacek Anaszewski <j.anaszewski@samsung.com>
parent 583a2b2c
...@@ -111,7 +111,7 @@ static int micro_leds_probe(struct platform_device *pdev) ...@@ -111,7 +111,7 @@ static int micro_leds_probe(struct platform_device *pdev)
{ {
int ret; int ret;
ret = led_classdev_register(&pdev->dev, &micro_led); ret = devm_led_classdev_register(&pdev->dev, &micro_led);
if (ret) { if (ret) {
dev_err(&pdev->dev, "registering led failed: %d\n", ret); dev_err(&pdev->dev, "registering led failed: %d\n", ret);
return ret; return ret;
...@@ -121,18 +121,11 @@ static int micro_leds_probe(struct platform_device *pdev) ...@@ -121,18 +121,11 @@ static int micro_leds_probe(struct platform_device *pdev)
return 0; 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 = { static struct platform_driver micro_leds_device_driver = {
.driver = { .driver = {
.name = "ipaq-micro-leds", .name = "ipaq-micro-leds",
}, },
.probe = micro_leds_probe, .probe = micro_leds_probe,
.remove = micro_leds_remove,
}; };
module_platform_driver(micro_leds_device_driver); module_platform_driver(micro_leds_device_driver);
......
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