ARM: davinci: WARN_ON() if clk_get() fails
Currently the timer code checks if the clock pointer passed to it is good (!IS_ERR(clk)). The new clocksource driver expects the clock to be functional and doesn't perform any checks so emit a warning if clk_get() fails. Apply this to all davinci platforms. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: David Lechner <david@lechnology.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
This commit is contained in:

committed by
Sekhar Nori

parent
29e97f56f2
commit
d470df3bc5
@@ -751,6 +751,10 @@ void __init da830_init_time(void)
|
||||
da830_pll_init(NULL, pll, NULL);
|
||||
|
||||
clk = clk_get(NULL, "timer0");
|
||||
if (WARN_ON(IS_ERR(clk))) {
|
||||
pr_err("Unable to get the timer clock\n");
|
||||
return;
|
||||
}
|
||||
|
||||
davinci_timer_init(clk);
|
||||
}
|
||||
|
Reference in New Issue
Block a user