sh: Skip uninitialized hwblk clocks
PATCH 1/13 sh: Skip uninitialized hwblk clocks
From: Magnus Damm <[email protected]>
Update the common hwblk clk code to skip over uninitialized clocks. Useful when registering clocks in an [HWBLK_NR] array.
Signed-off-by Magnus Damm <[email protected]>
---
arch/sh/kernel/cpu/hwblk.c | 5 +++++ 1 file changed, 5 insertions(+)
arch/sh/kernel/cpu/hwblk.c +5 -0
@@ -146,6 +146,11 @@ int __init sh_hwblk_clk_register(structfor (k =0 ; !ret && (k < nr); k++) { clkp = clks + k; + +/* skip over clocks using hwblk 0 (HWBLK_UNKNOWN) */ +if (!clkp->arch_flags) +continue ; + clkp->ops = &sh_hwblk_clk_ops; ret |=clk_register (clkp); }