提交 51167623 编写于 作者: M Muhammad Falak R Wani 提交者: Jacek Anaszewski

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: NMuhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
上级 81aad9f8
......@@ -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,
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册