1
0
Fork 0

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: Alexander Dahl <ada@thorsis.com>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
alistair/sunxi64-5.4-dsi
Alexander Dahl 2019-08-27 15:00:27 +02:00 committed by Jacek Anaszewski
parent 7c322056e3
commit 68bfcf6deb
1 changed files with 1 additions and 1 deletions

View File

@ -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;