Search
SailfishOS Open Build Service
>
Projects
>
home:dcthang:branches:nemo:devel:hw:ti:omap3:n900
>
kernel-adaptation-n900
> linux-2.6-dvfs-0029-OMAP3-cpufreq-Fix-uninitialzed-freqs.new-variable.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File linux-2.6-dvfs-0029-OMAP3-cpufreq-Fix-uninitialzed-freqs.new-variable.patch of Package kernel-adaptation-n900
From 4be53d2a69418f2042f4b81743969dd96b7dfd26 Mon Sep 17 00:00:00 2001 From: Jarkko Nikula <jhnikula@gmail.com> Date: Thu, 14 Apr 2011 14:43:28 +0300 Subject: [PATCH 29/32] OMAP3: cpufreq: Fix uninitialzed freqs.new variable Most likely code falls always through the (freqs.old == freqs.new) test in function omap_target as the freqs.new is uninitialized. It seems that freqs_notify.new setup was meant to be freqs.new as the freqs_notify is otherwise unused in this function. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> --- arch/arm/plat-omap/cpu-omap.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c index ec4fde0..358db96 100644 --- a/arch/arm/plat-omap/cpu-omap.c +++ b/arch/arm/plat-omap/cpu-omap.c @@ -91,7 +91,6 @@ static int omap_target(struct cpufreq_policy *policy, #if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE) unsigned long freq; int i; - struct cpufreq_freqs freqs_notify; struct device *mpu_dev = omap2_get_mpuss_device(); #endif int ret = 0; @@ -119,7 +118,7 @@ static int omap_target(struct cpufreq_policy *policy, cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); #elif defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE) freqs.old = omap_getspeed(policy->cpu);; - freqs_notify.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000; + freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000; freqs.cpu = policy->cpu; if (freqs.old == freqs.new) -- 1.7.0.4