All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] platform/x86: wmi: Stop using ACPI device class
@ 2024-01-30 22:19 Armin Wolf
  2024-02-06 10:14 ` Ilpo Järvinen
  0 siblings, 1 reply; 2+ messages in thread
From: Armin Wolf @ 2024-01-30 22:19 UTC (permalink / raw)
  To: hdegoede, ilpo.jarvinen; +Cc: rafael, platform-driver-x86, linux-kernel

When an ACPI netlink event is received by acpid, the ACPI device
class is passed as its first argument. But since the class string
is not initialized during probe, an empty string is being passed:

	netlink:  PNP0C14:01 000000d0 00000000

Fix this by passing a static string instead.

Tested on a Dell Inspiron 3505.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
Note: This patch is based on commit 3f399b5d7189 ("platform/x86: wmi: Use ACPI device name in netlink event")
---
 drivers/platform/x86/wmi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 7ef1e82dc61c..3335de4e32b2 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -1202,8 +1202,7 @@ static int wmi_notify_device(struct device *dev, void *data)
 		wblock->handler(*event, wblock->handler_data);
 	}

-	acpi_bus_generate_netlink_event(wblock->acpi_device->pnp.device_class,
-					acpi_dev_name(wblock->acpi_device), *event, 0);
+	acpi_bus_generate_netlink_event("wmi", acpi_dev_name(wblock->acpi_device), *event, 0);

 	return -EBUSY;
 }
--
2.39.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] platform/x86: wmi: Stop using ACPI device class
  2024-01-30 22:19 [PATCH v2] platform/x86: wmi: Stop using ACPI device class Armin Wolf
@ 2024-02-06 10:14 ` Ilpo Järvinen
  0 siblings, 0 replies; 2+ messages in thread
From: Ilpo Järvinen @ 2024-02-06 10:14 UTC (permalink / raw)
  To: hdegoede, Armin Wolf; +Cc: rafael, platform-driver-x86, linux-kernel

On Tue, 30 Jan 2024 23:19:42 +0100, Armin Wolf wrote:

> When an ACPI netlink event is received by acpid, the ACPI device
> class is passed as its first argument. But since the class string
> is not initialized during probe, an empty string is being passed:
> 
> 	netlink:  PNP0C14:01 000000d0 00000000
> 
> Fix this by passing a static string instead.
> 
> [...]


Thank you for your contribution, it has been applied to my local
review-ilpo branch. Note it will show up in the public
platform-drivers-x86/review-ilpo branch only once I've pushed my
local branch there, which might take a while.

The list of commits applied:
[1/1] platform/x86: wmi: Stop using ACPI device class
      commit: 6468e64ee380514b331ccb743fa491b23cd8b4dd

--
 i.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-06 10:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-30 22:19 [PATCH v2] platform/x86: wmi: Stop using ACPI device class Armin Wolf
2024-02-06 10:14 ` Ilpo Järvinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.