cpufreq: governor: Name delayed-work as dwork
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 19 Jun 2015 11:48:01 +0000 (17:18 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 17 Jul 2015 21:46:47 +0000 (23:46 +0200)
Delayed work was named as 'work' and to access work within it we do
work.work. Not much readable. Rename delayed_work as 'dwork'.

Reviewed-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq_conservative.c
drivers/cpufreq/cpufreq_governor.c
drivers/cpufreq/cpufreq_governor.h
drivers/cpufreq/cpufreq_ondemand.c

index c86a10c309123c682a571b2ae93c6c2bda6f5394..0e3ec1d968d906b50a65546340911f212d7df0e1 100644 (file)
@@ -105,7 +105,7 @@ static void cs_check_cpu(int cpu, unsigned int load)
 static void cs_dbs_timer(struct work_struct *work)
 {
        struct cs_cpu_dbs_info_s *dbs_info = container_of(work,
-                       struct cs_cpu_dbs_info_s, cdbs.work.work);
+                       struct cs_cpu_dbs_info_s, cdbs.dwork.work);
        unsigned int cpu = dbs_info->cdbs.cur_policy->cpu;
        struct cs_cpu_dbs_info_s *core_dbs_info = &per_cpu(cs_cpu_dbs_info,
                        cpu);
index 57a39f8a92b7fd41689ac3083decf3a5db4943d9..6024bbc782c026fd43ff3adaff165eedd08c58f9 100644 (file)
@@ -165,7 +165,7 @@ static inline void __gov_queue_work(int cpu, struct dbs_data *dbs_data,
 {
        struct cpu_dbs_common_info *cdbs = dbs_data->cdata->get_cpu_cdbs(cpu);
 
-       mod_delayed_work_on(cpu, system_wq, &cdbs->work, delay);
+       mod_delayed_work_on(cpu, system_wq, &cdbs->dwork, delay);
 }
 
 void gov_queue_work(struct dbs_data *dbs_data, struct cpufreq_policy *policy,
@@ -204,7 +204,7 @@ static inline void gov_cancel_work(struct dbs_data *dbs_data,
 
        for_each_cpu(i, policy->cpus) {
                cdbs = dbs_data->cdata->get_cpu_cdbs(i);
-               cancel_delayed_work_sync(&cdbs->work);
+               cancel_delayed_work_sync(&cdbs->dwork);
        }
 }
 
@@ -367,7 +367,7 @@ static int cpufreq_governor_start(struct cpufreq_policy *policy,
                        j_cdbs->prev_cpu_nice = kcpustat_cpu(j).cpustat[CPUTIME_NICE];
 
                mutex_init(&j_cdbs->timer_mutex);
-               INIT_DEFERRABLE_WORK(&j_cdbs->work, cdata->gov_dbs_timer);
+               INIT_DEFERRABLE_WORK(&j_cdbs->dwork, cdata->gov_dbs_timer);
        }
 
        if (cdata->governor == GOV_CONSERVATIVE) {
index 34736f5e869d139339366a625c07c0f30a858e9b..352eecaae789bab8cc0f18da6b30d66fec3a7bb0 100644 (file)
@@ -142,7 +142,7 @@ struct cpu_dbs_common_info {
         */
        unsigned int prev_load;
        struct cpufreq_policy *cur_policy;
-       struct delayed_work work;
+       struct delayed_work dwork;
        /*
         * percpu mutex that serializes governor limit change with gov_dbs_timer
         * invocation. We do not want gov_dbs_timer to run when user is changing
index 3c1e10f2304cd27476a3c8cef6a449f11eaa8855..830aef1db8c3c4b5dadedfc5cc7258df613e121e 100644 (file)
@@ -194,7 +194,7 @@ static void od_check_cpu(int cpu, unsigned int load)
 static void od_dbs_timer(struct work_struct *work)
 {
        struct od_cpu_dbs_info_s *dbs_info =
-               container_of(work, struct od_cpu_dbs_info_s, cdbs.work.work);
+               container_of(work, struct od_cpu_dbs_info_s, cdbs.dwork.work);
        unsigned int cpu = dbs_info->cdbs.cur_policy->cpu;
        struct od_cpu_dbs_info_s *core_dbs_info = &per_cpu(od_cpu_dbs_info,
                        cpu);
@@ -275,18 +275,18 @@ static void update_sampling_rate(struct dbs_data *dbs_data,
 
                mutex_lock(&dbs_info->cdbs.timer_mutex);
 
-               if (!delayed_work_pending(&dbs_info->cdbs.work)) {
+               if (!delayed_work_pending(&dbs_info->cdbs.dwork)) {
                        mutex_unlock(&dbs_info->cdbs.timer_mutex);
                        continue;
                }
 
                next_sampling = jiffies + usecs_to_jiffies(new_rate);
-               appointed_at = dbs_info->cdbs.work.timer.expires;
+               appointed_at = dbs_info->cdbs.dwork.timer.expires;
 
                if (time_before(next_sampling, appointed_at)) {
 
                        mutex_unlock(&dbs_info->cdbs.timer_mutex);
-                       cancel_delayed_work_sync(&dbs_info->cdbs.work);
+                       cancel_delayed_work_sync(&dbs_info->cdbs.dwork);
                        mutex_lock(&dbs_info->cdbs.timer_mutex);
 
                        gov_queue_work(dbs_data, dbs_info->cdbs.cur_policy,