From dd641e8e24279579b12a9ae77a6bc979b5fcbc24 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Fri, 30 Sep 2005 11:35:23 +0300 Subject: [PATCH] ARM: OMAP: Do not try to change rate on omap2 if no speed found Do not try to change rate on omap2 if no speed found --- arch/arm/mach-omap2/clock.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 63a16f4d555..26a3ae4fcce 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -24,6 +24,7 @@ #include #include + #include #include #include @@ -869,6 +870,7 @@ static int omap2_select_table_rate(struct clk * clk, unsigned long rate) u32 flags, cur_rate, done_rate, bypass = 0; u8 cpu_mask; struct prcm_config *prcm; + unsigned long found_speed = 0; if (clk != &virt_prcm_set) return -EINVAL; @@ -886,11 +888,13 @@ static int omap2_select_table_rate(struct clk * clk, unsigned long rate) if (prcm->xtal_speed != sys_ck.rate) continue; - if (prcm->mpu_speed <= rate) + if (prcm->mpu_speed <= rate) { + found_speed = prcm->mpu_speed; break; + } } - if (!prcm->mpu_speed) { + if (!found_speed) { printk(KERN_INFO "Could not set MPU rate to %luMHz\n", rate / 1000000); return -EINVAL; -- 2.41.1