From: Tony Lindgren Date: Fri, 30 Sep 2005 08:35:23 +0000 (+0300) Subject: ARM: OMAP: Do not try to change rate on omap2 if no speed found X-Git-Tag: v2.6.15-omap2~194 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=dd641e8e24279579b12a9ae77a6bc979b5fcbc24;p=linux-2.6-omap-h63xx.git 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 --- 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;