Commit 6461f018 authored by Viresh Kumar's avatar Viresh Kumar Committed by Rafael J. Wysocki

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: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 037ce839
...@@ -211,13 +211,14 @@ struct cpufreq_driver { ...@@ -211,13 +211,14 @@ struct cpufreq_driver {
}; };
/* flags */ /* flags */
#define CPUFREQ_STICKY 0x01 /* the driver isn't removed even if #define CPUFREQ_STICKY (1 << 0) /* driver isn't removed even if
* all ->init() calls failed */ all ->init() calls failed */
#define CPUFREQ_CONST_LOOPS 0x02 /* loops_per_jiffy or other kernel #define CPUFREQ_CONST_LOOPS (1 << 1) /* loops_per_jiffy or other
* "constants" aren't affected by kernel "constants" aren't
* frequency transitions */ affected by frequency
#define CPUFREQ_PM_NO_WARN 0x04 /* don't warn on suspend/resume speed transitions */
* mismatches */ #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_register_driver(struct cpufreq_driver *driver_data);
int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment