Skip to contentSkip to conversation

platform/x86: wmi: Use ACPI device name in netlink event

PATCH Superseded Armin Wolf 1 participant 1 message Jan 21, 2024 x86 platform drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Armin Wolf

author
#0 lore raw

PATCH 1/1 platform/x86: wmi: Use ACPI device name in netlink event

The device name inside the ACPI netlink event is limited to 15 characters, so the WMI device name will get truncated.

This can be observed with kacpimon when receiving an event from WMI device "9DBB5994-A997-11DA-B012-B622A1EF5492":

	netlink:  9DBB5994-A997- 000000d0 00000000

Fix this by using the shorter device name from the ACPI bus device instead. This still allows users to uniquely identify the WMI device by using the notify id (0xd0).

---
 drivers/platform/x86/wmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/wmi.c +1 -1
index a7cfcbf92432..4bacbe71cdb6 100644
@@ -1202,7 +1202,7 @@ static int wmi_notify_device(struct device *dev, void *data)
 	}
 
 	acpi_bus_generate_netlink_event(wblock->acpi_device->pnp.device_class,
-					dev_name(&wblock->dev.dev), *event, 0);
+					dev_name(&wblock->acpi_device->dev), *event, 0);
 
 	return -EBUSY;
 }

--
2.39.2