aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq_ondemand.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq/cpufreq_ondemand.c')
-rw-r--r--drivers/cpufreq/cpufreq_ondemand.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
index 291cfe9400a1..cbde076b5715 100644
--- a/drivers/cpufreq/cpufreq_ondemand.c
+++ b/drivers/cpufreq/cpufreq_ondemand.c
@@ -473,6 +473,7 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
473 unsigned int cpu = policy->cpu; 473 unsigned int cpu = policy->cpu;
474 struct cpu_dbs_info_s *this_dbs_info; 474 struct cpu_dbs_info_s *this_dbs_info;
475 unsigned int j; 475 unsigned int j;
476 int rc;
476 477
477 this_dbs_info = &per_cpu(cpu_dbs_info, cpu); 478 this_dbs_info = &per_cpu(cpu_dbs_info, cpu);
478 479
@@ -501,6 +502,16 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
501 return -ENOSPC; 502 return -ENOSPC;
502 } 503 }
503 } 504 }
505
506 rc = sysfs_create_group(&policy->kobj, &dbs_attr_group);
507 if (rc) {
508 if (dbs_enable == 1)
509 destroy_workqueue(kondemand_wq);
510 dbs_enable--;
511 mutex_unlock(&dbs_mutex);
512 return rc;
513 }
514
504 for_each_cpu_mask(j, policy->cpus) { 515 for_each_cpu_mask(j, policy->cpus) {
505 struct cpu_dbs_info_s *j_dbs_info; 516 struct cpu_dbs_info_s *j_dbs_info;
506 j_dbs_info = &per_cpu(cpu_dbs_info, j); 517 j_dbs_info = &per_cpu(cpu_dbs_info, j);
@@ -510,7 +521,6 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
510 j_dbs_info->prev_cpu_wall = get_jiffies_64(); 521 j_dbs_info->prev_cpu_wall = get_jiffies_64();
511 } 522 }
512 this_dbs_info->enable = 1; 523 this_dbs_info->enable = 1;
513 sysfs_create_group(&policy->kobj, &dbs_attr_group);
514 /* 524 /*
515 * Start the timerschedule work, when this governor 525 * Start the timerschedule work, when this governor
516 * is used for first time 526 * is used for first time