diff options
| -rw-r--r-- | drivers/cpufreq/cpufreq.c | 12 | ||||
| -rw-r--r-- | include/linux/cpufreq.h | 1 | 
2 files changed, 13 insertions, 0 deletions
| diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index ea58337fb65f..336b5e94cbc8 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1908,6 +1908,18 @@ void cpufreq_resume(void)  }  /** + * cpufreq_driver_test_flags - Test cpufreq driver's flags against given ones. + * @flags: Flags to test against the current cpufreq driver's flags. + * + * Assumes that the driver is there, so callers must ensure that this is the + * case. + */ +bool cpufreq_driver_test_flags(u16 flags) +{ +	return !!(cpufreq_driver->flags & flags); +} + +/**   *	cpufreq_get_current_driver - return current driver's name   *   *	Return the name string of the currently loaded cpufreq driver diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 038ed83aab41..1eaa04f1bae6 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -433,6 +433,7 @@ struct cpufreq_driver {  int cpufreq_register_driver(struct cpufreq_driver *driver_data);  int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); +bool cpufreq_driver_test_flags(u16 flags);  const char *cpufreq_get_current_driver(void);  void *cpufreq_get_driver_data(void); | 
