Commit f52e2408 authored by Hari Prasath Gujulan Elango's avatar Hari Prasath Gujulan Elango Committed by Greg Kroah-Hartman

staging: nvec: replace led_classdev_register

Replace the led_classdev_register() with the platform managed version
devm_led_classdev_register() & henceforth remove the redundant
nvec_paz00_remove() function.
Signed-off-by: default avatarHari Prasath Gujulan Elango <hgujulan@visteon.com>
Acked-by: default avatarMarc Dietrich <marvin24@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 66ad85d1
...@@ -63,7 +63,7 @@ static int nvec_paz00_probe(struct platform_device *pdev) ...@@ -63,7 +63,7 @@ static int nvec_paz00_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, led); platform_set_drvdata(pdev, led);
ret = led_classdev_register(&pdev->dev, &led->cdev); ret = devm_led_classdev_register(&pdev->dev, &led->cdev);
if (ret < 0) if (ret < 0)
return ret; return ret;
...@@ -73,18 +73,8 @@ static int nvec_paz00_probe(struct platform_device *pdev) ...@@ -73,18 +73,8 @@ static int nvec_paz00_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int nvec_paz00_remove(struct platform_device *pdev)
{
struct nvec_led *led = platform_get_drvdata(pdev);
led_classdev_unregister(&led->cdev);
return 0;
}
static struct platform_driver nvec_paz00_driver = { static struct platform_driver nvec_paz00_driver = {
.probe = nvec_paz00_probe, .probe = nvec_paz00_probe,
.remove = nvec_paz00_remove,
.driver = { .driver = {
.name = "nvec-paz00", .name = "nvec-paz00",
}, },
......
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