mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 18:37:58 -04:00
cpufreq: Remove cpufreq_driver check in cpufreq_boost_supported()
Currently there are three calling paths for cpufreq_boost_supported() in
all as below, we can see the cpufreq_driver null check is needless since
it is already checked before.
<path1>
cpufreq_enable_boost_support()
|-> if (!cpufreq_driver)
|-> cpufreq_boost_supported()
<path2>
cpufreq_register_driver()
|-> if (!driver_data ...
|-> cpufreq_driver = driver_data
|-> cpufreq_boost_supported()
|-> remove_boost_sysfs_file()
|-> cpufreq_boost_supported()
<path3>
cpufreq_unregister_driver()
|-> if (!cpufreq_driver ...
|-> remove_boost_sysfs_file()
|-> cpufreq_boost_supported()
Signed-off-by: Yue Hu <huyue2@yulong.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
committed by
Rafael J. Wysocki
parent
e75135e601
commit
89f98d7e5f
@@ -2472,7 +2472,7 @@ int cpufreq_boost_trigger_state(int state)
|
||||
|
||||
static bool cpufreq_boost_supported(void)
|
||||
{
|
||||
return likely(cpufreq_driver) && cpufreq_driver->set_boost;
|
||||
return cpufreq_driver->set_boost;
|
||||
}
|
||||
|
||||
static int create_boost_sysfs_file(void)
|
||||
|
||||
Reference in New Issue
Block a user