aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cpufreq.h
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2013-10-02 14:13:17 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-10-16 00:50:23 +0200
commit6461f018e7ad08863b55c386bf694683e4e2e86e (patch)
tree6095679a7304663610868f402e4b55c2f0d5866b /include/linux/cpufreq.h
parentcpufreq: rename __cpufreq_set_policy() as cpufreq_set_policy() (diff)
downloadlinux-dev-6461f018e7ad08863b55c386bf694683e4e2e86e.tar.xz
linux-dev-6461f018e7ad08863b55c386bf694683e4e2e86e.zip
cpufreq: rewrite cpufreq_driver->flags using shift operator
Currently cpufreq_driver's flags are defined directly using 0x1, 0x2, 0x4, 0x8, etc.. As the list grows it becomes less readable.. Use bitwise shift operator << to generate these numbers for respective positions. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/cpufreq.h')
-rw-r--r--include/linux/cpufreq.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 6b199ed7aa58..00c80a5372db 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -211,13 +211,14 @@ struct cpufreq_driver {
};
/* flags */
-#define CPUFREQ_STICKY 0x01 /* the driver isn't removed even if
- * all ->init() calls failed */
-#define CPUFREQ_CONST_LOOPS 0x02 /* loops_per_jiffy or other kernel
- * "constants" aren't affected by
- * frequency transitions */
-#define CPUFREQ_PM_NO_WARN 0x04 /* don't warn on suspend/resume speed
- * mismatches */
+#define CPUFREQ_STICKY (1 << 0) /* driver isn't removed even if
+ all ->init() calls failed */
+#define CPUFREQ_CONST_LOOPS (1 << 1) /* loops_per_jiffy or other
+ kernel "constants" aren't
+ affected by frequency
+ transitions */
+#define CPUFREQ_PM_NO_WARN (1 << 2) /* don't warn on suspend/resume
+ speed mismatches */
int cpufreq_register_driver(struct cpufreq_driver *driver_data);
int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);