]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
clocksource/drivers/stm32-lptimer: Use wakeup capable instead of init wakeup
authorAlexandre Torgue <alexandre.torgue@foss.st.com>
Thu, 6 Mar 2025 10:25:01 +0000 (11:25 +0100)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Fri, 7 Mar 2025 16:55:59 +0000 (17:55 +0100)
"wakeup-source" property describes a device which has wakeup capability
but should not force this device as a wakeup source.

Fixes: 48b41c5e2de6 ("clocksource: Add Low Power STM32 timers driver")
Cc: stable@vger.kernel.org
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Rule: add
Link: https://lore.kernel.org/stable/20250306083407.2374894-1-fabrice.gasnier%40foss.st.com
Link: https://lore.kernel.org/r/20250306102501.2980153-1-fabrice.gasnier@foss.st.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/clocksource/timer-stm32-lp.c

index 9cd487dd5a3a47d5a0c030b0c4e2243396ed738d..928da2f6de69e3e11ffa5b41b6c5cf46e72c1183 100644 (file)
@@ -194,9 +194,7 @@ static int stm32_clkevent_lp_probe(struct platform_device *pdev)
        }
 
        if (of_property_read_bool(pdev->dev.parent->of_node, "wakeup-source")) {
-               ret = device_init_wakeup(&pdev->dev, true);
-               if (ret)
-                       goto out_clk_disable;
+               device_set_wakeup_capable(&pdev->dev, true);
 
                ret = dev_pm_set_wake_irq(&pdev->dev, irq);
                if (ret)