diff options
author | Yue Hu <huyue2@yulong.com> | 2019-04-09 10:25:36 +0800 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-04-09 09:57:16 +0200 |
commit | 89f98d7e5fa8f7e1ba627537dc8a3cef5add7b04 (patch) | |
tree | e8d2c60465f5244a2be9b7e795b42f0d02451a99 /drivers/cpufreq | |
parent | e75135e601ee9084953e21a452053d6a21a72db8 (diff) | |
download | linux-89f98d7e5fa8f7e1ba627537dc8a3cef5add7b04.tar.gz linux-89f98d7e5fa8f7e1ba627537dc8a3cef5add7b04.tar.bz2 linux-89f98d7e5fa8f7e1ba627537dc8a3cef5add7b04.zip |
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>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index f3f79266ab48..3f235d5f67ee 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -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) |