From f82c6c9ac993003da3171e60f708f4be8b27041b Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Fri, 3 Jul 2026 13:19:59 +0200 Subject: [PATCH] platform/x86: asus-laptop: Stop setting acpi_device_name/class() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The driver sets acpi_device_name() which is never read afterward, so make it stop doing that and drop the symbol defined specifically for this purpose. Likewise, acpi_device_class() set by the driver is only used for generating ACPI netlink events, but the "hotkey" string literal may as well be used directly for that, so make the driver do so and stop setting acpi_device_class(), and drop the symbol defined specifically for this purpose. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/5106055.GXAFRqVoOG@rafael.j.wysocki Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen --- drivers/platform/x86/asus-laptop.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index 140ac8a10537..449addd1ac7a 100644 --- a/drivers/platform/x86/asus-laptop.c +++ b/drivers/platform/x86/asus-laptop.c @@ -42,8 +42,6 @@ #define ASUS_LAPTOP_VERSION "0.42" #define ASUS_LAPTOP_NAME "Asus Laptop Support" -#define ASUS_LAPTOP_CLASS "hotkey" -#define ASUS_LAPTOP_DEVICE_NAME "Hotkey" #define ASUS_LAPTOP_FILE KBUILD_MODNAME #define ASUS_LAPTOP_PREFIX "\\_SB.ATKD." @@ -1524,9 +1522,8 @@ static void asus_acpi_notify(acpi_handle handle, u32 event, void *data) /* TODO Find a better way to handle events count. */ count = asus->event_count[event % 128]++; - acpi_bus_generate_netlink_event(asus->device->pnp.device_class, - dev_name(&asus->device->dev), event, - count); + acpi_bus_generate_netlink_event("hotkey", dev_name(&asus->device->dev), + event, count); if (event >= ATKD_BRNUP_MIN && event <= ATKD_BRNUP_MAX) event = ATKD_BRNUP; @@ -1840,8 +1837,6 @@ static int asus_acpi_probe(struct platform_device *pdev) if (!asus) return -ENOMEM; asus->handle = device->handle; - strscpy(acpi_device_name(device), ASUS_LAPTOP_DEVICE_NAME); - strscpy(acpi_device_class(device), ASUS_LAPTOP_CLASS); asus->device = device; asus_dmi_check();