Commit 68bfcf6d authored by Alexander Dahl's avatar Alexander Dahl Committed by Jacek Anaszewski

leds: syscon: Use resource managed variant of device register

We have a MFD driver compiled as module instantiating this driver. When
unloading that module, those LED devices are not removed, which produces
conflicts, when that module is inserted again.
Signed-off-by: default avatarAlexander Dahl <ada@thorsis.com>
Signed-off-by: default avatarJacek Anaszewski <jacek.anaszewski@gmail.com>
parent 7c322056
......@@ -115,7 +115,7 @@ static int syscon_led_probe(struct platform_device *pdev)
}
sled->cdev.brightness_set = syscon_led_set;
ret = led_classdev_register(dev, &sled->cdev);
ret = devm_led_classdev_register(dev, &sled->cdev);
if (ret < 0)
return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment