From: Muhammad Falak R Wani Date: Fri, 16 Oct 2015 23:32:57 +0000 (+0530) Subject: leds: leds-net48xx: Use devm_led_classdev_register X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=511676230b56249ecb613298f95f9910684fcb4f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git leds: leds-net48xx: Use devm_led_classdev_register Use devm_led_classdev_register instead of led_classdev_register, removing the redundant net48xx_led_remove function. Signed-off-by: Muhammad Falak R Wani Signed-off-by: Jacek Anaszewski --- diff --git a/drivers/leds/leds-net48xx.c b/drivers/leds/leds-net48xx.c index ec3a2e8adcae..0d214c2e403c 100644 --- a/drivers/leds/leds-net48xx.c +++ b/drivers/leds/leds-net48xx.c @@ -39,18 +39,11 @@ static struct led_classdev net48xx_error_led = { static int net48xx_led_probe(struct platform_device *pdev) { - return led_classdev_register(&pdev->dev, &net48xx_error_led); -} - -static int net48xx_led_remove(struct platform_device *pdev) -{ - led_classdev_unregister(&net48xx_error_led); - return 0; + return devm_led_classdev_register(&pdev->dev, &net48xx_error_led); } static struct platform_driver net48xx_led_driver = { .probe = net48xx_led_probe, - .remove = net48xx_led_remove, .driver = { .name = DRVNAME, },