* Stephen Boyd <sboyd@xxxxxxxxxxxxxx> [150505 22:36]: > On 05/05, Tony Lindgren wrote: > > With recent changes to use determine_rate, the comparison of two > > clocks won't work without doing __clk_get_hw on the clocks > > first. > > > > Cc: Michael Turquette <mturquette@xxxxxxxxxx> > > Cc: Paul Walmsley <paul@xxxxxxxxx> > > Cc: Stephen Boyd <sboyd@xxxxxxxxxxxxxx> > > Cc: Tero Kristo <t-kristo@xxxxxx> > > Cc: Tomeu Vizoso <tomeu.vizoso@xxxxxxxxxxxxx> > > Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx> > > --- > > > > Found one more of these, the coccinelle scripts do not seem > > to match this? > > I don't think the coccinelle script was ever merged... Oh OK, but the wrong comparisons in the kernel code got fixed, right? > > @@ -298,7 +299,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, > > if (IS_ERR(src)) > > return PTR_ERR(src); > > > > - if (clk_get_parent(timer->fclk) != src) { > > + if (__clk_get_hw(clk_get_parent(timer->fclk)) != __clk_get_hw(src)) { > > Please use clk_is_match() instead so we can find these instances > with an easy grep. Thanks here's an updated version with that. Regards, Tony 8< ----------------------------- From: Tony Lindgren <tony@xxxxxxxxxxx> Date: Tue, 5 May 2015 09:03:34 -0700 Subject: [PATCH] ARM: OMAP2+: Fix bogus struct clk comparison for timer clock With recent changes to use determine_rate, the comparison of two clocks won't work without clk_is_match that does __clk_get_hw on the clocks first. Cc: Michael Turquette <mturquette@xxxxxxxxxx> Cc: Paul Walmsley <paul@xxxxxxxxx> Cc: Stephen Boyd <sboyd@xxxxxxxxxxxxxx> Cc: Tero Kristo <t-kristo@xxxxxx> Cc: Tomeu Vizoso <tomeu.vizoso@xxxxxxxxxxxxx> Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx> --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -298,7 +298,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, if (IS_ERR(src)) return PTR_ERR(src); - if (clk_get_parent(timer->fclk) != src) { + if (!clk_is_match(clk_get_parent(timer->fclk), src)) { r = clk_set_parent(timer->fclk, src); if (r < 0) { pr_warn("%s: %s cannot set source\n", __func__, -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html