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 <a...@thorsis.com>
---
 drivers/leds/leds-syscon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

Reply via email to