diff options
| author | Hans de Goede <hdegoede@redhat.com> | 2021-11-21 20:11:26 +0100 |
|---|---|---|
| committer | Hans de Goede <hdegoede@redhat.com> | 2021-11-25 16:18:48 +0100 |
| commit | 0b0d2fba4f3302b601c429c9286e66b3af2d29cb (patch) | |
| tree | 8e12b10a573d85f1ba7cf2b7f6b653507b28ae92 /tools/perf/scripts/python | |
| parent | platform/x86: thinkpad_acpi: Simplify dytc_version handling (diff) | |
| download | linux-0b0d2fba4f3302b601c429c9286e66b3af2d29cb.tar.gz linux-0b0d2fba4f3302b601c429c9286e66b3af2d29cb.zip | |
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 <andy.shevchenko@gmail.com>
Tested-by: Mark Pearson <mpearson@lenovo.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211121191129.256713-5-hdegoede@redhat.com
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
