[PATCH v1 01/10] platform/x86: asus-laptop: Stop setting acpi_device_name/class()

From: Rafael J. Wysocki

Date: Fri Jul 03 2026 - 07:40:14 EST


From: "Rafael J. Wysocki" <rafael.j.wysocki@xxxxxxxxx>

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 <rafael.j.wysocki@xxxxxxxxx>
---
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();
--
2.51.0