platform/x86: thinkpad_acpi: Simplify dytc_version handling
authorHans de Goede <hdegoede@redhat.com>
Sun, 21 Nov 2021 19:11:25 +0000 (20:11 +0100)
committerHans de Goede <hdegoede@redhat.com>
Thu, 25 Nov 2021 15:18:43 +0000 (16:18 +0100)
commit5a47ac0041678d3d610b3ac724bca8c4bda2ddff
treececbbd6c5c95de172caaeec91613339a60054ff5
parentc7e1c782f2432cd4dc6c6ea930d99d93997a0edb
platform/x86: thinkpad_acpi: Simplify dytc_version handling

The only reason the proxysensor code needs dytc_version handling is for
proxsensor_attr_is_visible() and that will only ever get called after
all the subdrv init() callbacks have run.

tpacpi_dytc_profile_init() already calls DYTC_CMD_QUERY and is the
primary consumer of dytc_version, so simply let tpacpi_dytc_profile_init()
set dytc_version and remove the now no longer necessary dytc_get_version()
helper and its calls.

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-4-hdegoede@redhat.com
drivers/platform/x86/thinkpad_acpi.c