mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-03 17:14:14 +08: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:
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)
|
||||
|
Loading…
Reference in New Issue
Block a user