platform/x86: think-lmi: Clean up display of current_value on Thinkstation
authorMark Pearson <mpearson-lenovo@squebb.ca>
Mon, 3 Apr 2023 01:31:20 +0000 (21:31 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Apr 2023 14:55:22 +0000 (16:55 +0200)
commit73e863aa2505ac3340c594158fa5d606acecbe3f
treeccfe57d9014f21ed0acf357cfc56c75f12e0e539
parent081da7b1c881828244b93b3befb7c18389f696bb
platform/x86: think-lmi: Clean up display of current_value on Thinkstation

[ Upstream commit 7065655216d4d034d71164641f3bec0b189ad6fa ]

On ThinkStations on retrieving the attribute value the BIOS appends the
possible values to the string.
Clean up the display in the current_value_show function so the options
part is not displayed.

Fixes: a40cd7ef22fb ("platform/x86: think-lmi: Add WMI interface support on Lenovo platforms")
Reported by Mario Limoncello <Mario.Limonciello@amd.com>
Link: https://github.com/fwupd/fwupd/issues/5077#issuecomment-1488730526
Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Link: https://lore.kernel.org/r/20230403013120.2105-2-mpearson-lenovo@squebb.ca
Tested-by: Mario Limonciello <mario.limonciello@amd.com>
Tested-by: Mirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/x86/think-lmi.c