diff options
-rw-r--r-- | arch/arm/mach-tegra/common.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c index 45ed7344e996..4661f9e1d368 100644 --- a/arch/arm/mach-tegra/common.c +++ b/arch/arm/mach-tegra/common.c @@ -794,7 +794,7 @@ static void cpufreq_set_governor(char *governor) struct file *scaling_gov = NULL; mm_segment_t old_fs; char buf[128]; - int i; + int i = 0; loff_t offset = 0; if (governor == NULL) @@ -804,7 +804,10 @@ static void cpufreq_set_governor(char *governor) old_fs = get_fs(); set_fs(KERNEL_DS); - for_each_online_cpu(i) { +#ifndef CONFIG_TEGRA_AUTO_HOTPLUG + for_each_online_cpu(i) +#endif + { sprintf(buf, cpufreq_sysfs_place_holder, i); scaling_gov = filp_open(buf, O_RDWR, 0); if (IS_ERR_OR_NULL(scaling_gov)) { |