diff options
author | Muhammad Falak R Wani <falakreyaz@gmail.com> | 2015-10-17 05:02:57 +0530 |
---|---|---|
committer | Jacek Anaszewski <j.anaszewski@samsung.com> | 2015-11-03 08:59:54 +0100 |
commit | 511676230b56249ecb613298f95f9910684fcb4f (patch) | |
tree | c41722d37258c2f5e26a3a812c0f9288cf2bdb0b /drivers/leds | |
parent | 81aad9f81e6d89819f12656bd38df9ef639dbe45 (diff) |
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 <falakreyaz@gmail.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/leds-net48xx.c | 9 |
1 files changed, 1 insertions, 8 deletions
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, }, |