diff options
| author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2019-04-02 19:12:50 +0300 | 
|---|---|---|
| committer | Zhang Rui <rui.zhang@intel.com> | 2019-05-06 15:35:24 +0300 | 
| commit | f37353320ee9905ef7aaba4c67eae85496bee950 (patch) | |
| tree | 0044c8794bca5822c0d8ccec4efffdabd51e5807 /tools/perf/scripts/python/sched-migration.py | |
| parent | 2e31c8560a564a70f13e3b6acab49bffbe41e965 (diff) | |
| download | linux-f37353320ee9905ef7aaba4c67eae85496bee950.tar.xz | |
hwmon/drivers/core: Simplify complex dependency
As the thermal framework does not longer compile as a module, we can
simplify this condition below:
 if IS_REACHABLE(CONFIG_THERMAL) && defined(CONFIG_THERMAL_OF) && \
       (!defined(CONFIG_THERMAL_HWMON) || \
        !(defined(MODULE) && IS_MODULE(CONFIG_THERMAL)))
 if IS_REACHABLE(CONFIG_THERMAL) && defined(CONFIG_THERMAL_OF) && \
       (!defined(CONFIG_THERMAL_HWMON) || \
        !(defined(MODULE) && 0))
=> (whatever && 0) = 0
 if IS_REACHABLE(CONFIG_THERMAL) && defined(CONFIG_THERMAL_OF) && \
       (!defined(CONFIG_THERMAL_HWMON) || !(0))
 if IS_REACHABLE(CONFIG_THERMAL) && defined(CONFIG_THERMAL_OF) && \
       (!defined(CONFIG_THERMAL_HWMON) || 1)
=> (whatever || 1) = 1
 if IS_REACHABLE(CONFIG_THERMAL) && defined(CONFIG_THERMAL_OF) && \
       (1)
=> (whatever && 1) = whatever
 if IS_REACHABLE(CONFIG_THERMAL) && defined(CONFIG_THERMAL_OF)
CONFIG_THERMAL can not be a module anymore, then:
 if defined(CONFIG_THERMAL) && defined(CONFIG_THERMAL_OF)
And CONFIG_THERMAL_OF already depends on CONFIG_THERMAL, so:
 if defined(CONFIG_THERMAL_OF)
Thus,
 ifdef CONFIG_THERMAL_OF
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/sched-migration.py')
0 files changed, 0 insertions, 0 deletions
