From: Hari Prasath Gujulan Elango Date: Thu, 21 Jan 2016 10:23:46 +0000 (+0000) Subject: staging: nvec: replace led_classdev_register X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f52e240816cb268a11fee011aa9b7dc4185d9ded;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Hari Prasath Gujulan Elango Acked-by: Marc Dietrich Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/nvec/nvec_paz00.c b/drivers/staging/nvec/nvec_paz00.c index 68146bfee2b3..cddbfd2bcf11 100644 --- a/drivers/staging/nvec/nvec_paz00.c +++ b/drivers/staging/nvec/nvec_paz00.c @@ -63,7 +63,7 @@ static int nvec_paz00_probe(struct platform_device *pdev) 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) return ret; @@ -73,18 +73,8 @@ static int nvec_paz00_probe(struct platform_device *pdev) 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 = { .probe = nvec_paz00_probe, - .remove = nvec_paz00_remove, .driver = { .name = "nvec-paz00", },