forked from luck/tmp_suning_uos_patched
leds: leds-ipaq-micro: Use devm_led_classdev_register
Use of resource-managed function devm_led_classdev_register instead of led_classdev_register is preferred, consequently remove redundant function micro_leds_remove. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
This commit is contained in:
parent
583a2b2cd7
commit
431557f4a4
|
@ -111,7 +111,7 @@ static int micro_leds_probe(struct platform_device *pdev)
|
|||
{
|
||||
int ret;
|
||||
|
||||
ret = led_classdev_register(&pdev->dev, µ_led);
|
||||
ret = devm_led_classdev_register(&pdev->dev, µ_led);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "registering led failed: %d\n", ret);
|
||||
return ret;
|
||||
|
@ -121,18 +121,11 @@ static int micro_leds_probe(struct platform_device *pdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int micro_leds_remove(struct platform_device *pdev)
|
||||
{
|
||||
led_classdev_unregister(µ_led);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver micro_leds_device_driver = {
|
||||
.driver = {
|
||||
.name = "ipaq-micro-leds",
|
||||
},
|
||||
.probe = micro_leds_probe,
|
||||
.remove = micro_leds_remove,
|
||||
};
|
||||
module_platform_driver(micro_leds_device_driver);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user