platform/x86: Use device_show_string() helper for sysfs attributes
authorLukas Wunner <lukas@wunner.de>
Sat, 20 Apr 2024 20:00:05 +0000 (22:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 4 May 2024 15:37:03 +0000 (17:37 +0200)
commit3182459b7bff642eb968d6203a08aea3862436c1
treefb910224e2486bc672a8c5929787db7b8b4768cd
parentb91b73a43822566930490e5aa421ccb1900a2124
platform/x86: Use device_show_string() helper for sysfs attributes

Deduplicate sysfs ->show() callbacks which expose a string at a static
memory location.  Use the newly introduced device_show_string() helper
in the driver core instead by declaring those sysfs attributes with
DEVICE_STRING_ATTR_RO().

No functional change intended.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/3ae8c9a73fbb291c1c863777af175c657a2a10e9.1713608122.git.lukas@wunner.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/x86/asus-wmi.c
drivers/platform/x86/thinkpad_acpi.c
drivers/platform/x86/toshiba_acpi.c