diff options
| author | Hans de Goede <[email protected]> | 2021-11-21 20:11:26 +0100 |
|---|---|---|
| committer | Hans de Goede <[email protected]> | 2021-11-25 16:18:48 +0100 |
| commit | 0b0d2fba4f3302b601c429c9286e66b3af2d29cb (patch) | |
| tree | 8e12b10a573d85f1ba7cf2b7f6b653507b28ae92 /tools/perf/scripts/python/bin | |
| parent | 5a47ac0041678d3d610b3ac724bca8c4bda2ddff (diff) | |
platform/x86: thinkpad_acpi: Cleanup dytc_profile_available
Remove the dytc_profile_available check from dytc_profile_set(),
that function only gets called if the platform_profile_handler was
registered, so the check is not necessary.
Make tpacpi_dytc_profile_init() return -ENODEV when it does not register
the platform_profile() handler this will cause
dytc_profile_driver_data.flags.init to not get set, which in turn will
cause the dytc_profile_exit() call to get skipped.
Together this avoids the need to have the dytc_profile_available
variable at all, since the information is now duplicated in the
dytc_profile_driver_data.flags.init flag.
Note this leaves a weirdly indented code-block behind, this is
deliberately done to make what actually changes in this commit clear.
This will be fixed-up in the next commit.
Reviewed-by: Andy Shevchenko <[email protected]>
Tested-by: Mark Pearson <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions