diff options
author | Alexander Dahl <ada@thorsis.com> | 2019-08-27 15:00:27 +0200 |
---|---|---|
committer | Jacek Anaszewski <jacek.anaszewski@gmail.com> | 2019-09-01 13:33:27 +0200 |
commit | 68bfcf6debd72121758d6e0fbf75f506126d7b9a (patch) | |
tree | c1c138f18c170361169abe2993af62dbf1494c6a | |
parent | leds: Replace {devm_}led_classdev_register() macros with inlines (diff) | |
download | linux-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.c | 2 |
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; |