[RFC PATCH 4/4] timer-ti-dm: Fix omap_dm_timer_of_set_source()

From: Neil Armstrong
Date: Mon Jul 16 2018 - 16:39:15 EST


With the move to clocksource, the omap_dm_timer_of_set_source() broke
because the "fclk" clock is now defined in the DT.
The omap_dm_timer_of_set_source() was using the first clock declared in the
timer node, but now this clock must be named as "src" and clk_get() use
"src" as clock name to permit specifiying the parent clock of the timer "fclk".

Signed-off-by: Neil Armstrong <narmstrong@xxxxxxxxxxxx>
---
drivers/clocksource/timer-ti-dm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
index 4cce6b2..868bc78 100644
--- a/drivers/clocksource/timer-ti-dm.c
+++ b/drivers/clocksource/timer-ti-dm.c
@@ -150,7 +150,7 @@ static int omap_dm_timer_of_set_source(struct omap_dm_timer *timer)
if (!timer->fclk)
return -ENODEV;

- parent = clk_get(&timer->pdev->dev, NULL);
+ parent = clk_get(&timer->pdev->dev, "src");
if (IS_ERR(parent))
return -ENODEV;

--
2.7.4