summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Dahl <ada@thorsis.com>2019-08-27 15:00:27 +0200
committerJacek Anaszewski <jacek.anaszewski@gmail.com>2019-09-01 13:33:27 +0200
commit68bfcf6debd72121758d6e0fbf75f506126d7b9a (patch)
treec1c138f18c170361169abe2993af62dbf1494c6a
parentleds: Replace {devm_}led_classdev_register() macros with inlines (diff)
downloadlinux-68bfcf6debd72121758d6e0fbf75f506126d7b9a.tar.xz
linux-68bfcf6debd72121758d6e0fbf75f506126d7b9a.zip
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>
-rw-r--r--drivers/leds/leds-syscon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/leds-syscon.c b/drivers/leds/leds-syscon.c
index e35dff0050f0..b58f3cafe16f 100644
--- a/drivers/leds/leds-syscon.c
+++ b/drivers/leds/leds-syscon.c
@@ -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;