'camera' clock has the only parent and thus has no reg_src.
It has a parent clock but it prints 'No parent clock specified' message.
This patch is to deal with the case with the only parent clock.
---
 arch/arm/plat-samsung/clock-clksrc.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/arch/arm/plat-samsung/clock-clksrc.c 
b/arch/arm/plat-samsung/clock-clksrc.c
index 786a410..c00bd86 100644
--- a/arch/arm/plat-samsung/clock-clksrc.c
+++ b/arch/arm/plat-samsung/clock-clksrc.c
@@ -131,18 +131,19 @@ void __init_or_cpufreq s3c_set_clksrc(struct clksrc_clk 
*clk, bool announce)
 {
        struct clksrc_sources *srcs = clk->sources;
        u32 mask = bit_mask(clk->reg_src.shift, clk->reg_src.size);
-       u32 clksrc;
+       u32 clksrc = 0;
 
-       if (!clk->reg_src.reg) {
-               if (!clk->clk.parent)
-                       printk(KERN_ERR "%s: no parent clock specified\n",
-                               clk->clk.name);
+       if (!clk->reg_src.reg && !clk->clk.parent && !srcs->nr_sources) {
+               printk(KERN_ERR "%s: no parent clock specified\n",
+                      clk->clk.name);
                return;
        }
 
-       clksrc = __raw_readl(clk->reg_src.reg);
-       clksrc &= mask;
-       clksrc >>= clk->reg_src.shift;
+       if (srcs->nr_sources > 1) {
+               clksrc = __raw_readl(clk->reg_src.reg);
+               clksrc &= mask;
+               clksrc >>= clk->reg_src.shift;
+       }
 
        if (clksrc > srcs->nr_sources || !srcs->sources[clksrc]) {
                printk(KERN_ERR "%s: bad source %d\n",
-- 
1.7.8.6

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to