aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/cpufreq/cpufreq_ondemand.c2
-rw-r--r--include/linux/workqueue.h6
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
index 8d053f500fc2..8532bb79e5fc 100644
--- a/drivers/cpufreq/cpufreq_ondemand.c
+++ b/drivers/cpufreq/cpufreq_ondemand.c
@@ -470,7 +470,7 @@ static inline void dbs_timer_init(struct cpu_dbs_info_s *dbs_info)
470 dbs_info->enable = 1; 470 dbs_info->enable = 1;
471 ondemand_powersave_bias_init(); 471 ondemand_powersave_bias_init();
472 dbs_info->sample_type = DBS_NORMAL_SAMPLE; 472 dbs_info->sample_type = DBS_NORMAL_SAMPLE;
473 INIT_DELAYED_WORK(&dbs_info->work, do_dbs_timer); 473 INIT_DELAYED_WORK_DEFERRABLE(&dbs_info->work, do_dbs_timer);
474 queue_delayed_work_on(dbs_info->cpu, kondemand_wq, &dbs_info->work, 474 queue_delayed_work_on(dbs_info->cpu, kondemand_wq, &dbs_info->work,
475 delay); 475 delay);
476} 476}
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index b8abfc74d038..f16ba1e0687d 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -121,6 +121,12 @@ struct execute_work {
121 init_timer(&(_work)->timer); \ 121 init_timer(&(_work)->timer); \
122 } while (0) 122 } while (0)
123 123
124#define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \
125 do { \
126 INIT_WORK(&(_work)->work, (_func)); \
127 init_timer_deferrable(&(_work)->timer); \
128 } while (0)
129
124/** 130/**
125 * work_pending - Find out whether a work item is currently pending 131 * work_pending - Find out whether a work item is currently pending
126 * @work: The work item in question 132 * @work: The work item in question