ARM: OMAP: hwmod: fix an incorrect clk type cast with _get_clkdm
authorTero Kristo <t-kristo@ti.com>
Fri, 12 Jul 2013 09:26:41 +0000 (12:26 +0300)
committerMike Turquette <mturquette@linaro.org>
Fri, 17 Jan 2014 20:37:03 +0000 (12:37 -0800)
commit924f9498acb004d8cb704a008f1060fad604ccca
tree5e3bc623bcda1111662262144d59fb6d028ce8f7
parent519ab8b202f37fb76cc6f32ef34da79716680d03
ARM: OMAP: hwmod: fix an incorrect clk type cast with _get_clkdm

If the main clock for a hwmod is of basic clock type, it is illegal to type
cast this to clk_hw_omap and will result in bogus data. Fixed by checking
the clock flags before attempting the type cast.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Tested-by: Nishanth Menon <nm@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
arch/arm/mach-omap2/omap_hwmod.c