Skip to content

platform/x86: wmi: Pass event data directly to legacy notify handlers

Armin Wolf linux-acpi linux-hwmon lkml platform-driver-x86 2 versions – Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 7 repliesApplied
  2. v15 patches 8 repliesSuperseded

Changes in v2 from the cover letter

- Rework the hp-wmi-sensors patch
- add Reviewed-by tags

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/5hwmon: (hp-wmi-sensors) Check if WMI event data existsdrivers/hwmon/hp-wmi-sensors.c+2 -06 replies
2/5platform/x86: wmi: Pass event data directly to legacy notify handlersdrivers/hwmon/hp-wmi-sensors.c drivers/platform/x86/acer-wmi.c drivers/platform/x86/asus-wmi.c +8 more+37 -1560 replies
3/5platform/x86: wmi: Remove wmi_get_event_data()drivers/platform/x86/wmi.c include/linux/acpi.h+0 -580 replies
4/5platform/x86: wmi: Merge get_event_data() with wmi_get_notify_data()drivers/platform/x86/wmi.c+17 -260 replies
5/5platform/x86: wmi: Call both legacy and WMI driver notify handlersdrivers/platform/x86/wmi.c+6 -80 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchIlpo JärvinenHans de Goede
1/5R-b
2/5R-b R-b
3/5R-b R-b
4/5R-b R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/5] platform/x86: wmi: Pass event data directly to legacy notify handlers

The current legacy WMI handlers are susceptible to picking up wrong WMI event data on systems where different WMI devices share some notification IDs.

Prevent this by letting the WMI driver core taking care of retrieving the event data. This also simplifies the legacy WMI handlers and their implementation inside the WMI driver core.

The fisr patch fixes a minor issue discovered inside the hp-wmi-sensors driver.
The second patch converts all legacy WMI notify handlers to stop using wmi_get_event_data() and instead use the new event data provided by the WMI driver core.
The remaining patches finally perform some cleanups.

The patch series was tested on a Dell Inspiron 3505 and a Acer Aspire E1-731 and appears to work.

Changes since v1:
- Rework the hp-wmi-sensors patch
- add Reviewed-by tags

Armin Wolf (5):
hwmon: (hp-wmi-sensors) Check if WMI event data exists platform/x86: wmi: Pass event data directly to legacy notify handlers platform/x86: wmi: Remove wmi_get_event_data() platform/x86: wmi: Merge get_event_data() with wmi_get_notify_data() platform/x86: wmi: Call both legacy and WMI driver notify handlers

 drivers/hwmon/hp-wmi-sensors.c           |  20 +---
 drivers/platform/x86/acer-wmi.c          |  16 +--
 drivers/platform/x86/asus-wmi.c          |  19 +--
 drivers/platform/x86/dell/dell-wmi-aio.c |  13 +--
 drivers/platform/x86/hp/hp-wmi.c         |  16 +--
 drivers/platform/x86/huawei-wmi.c        |  14 +--
 drivers/platform/x86/lg-laptop.c         |  13 +--
 drivers/platform/x86/msi-wmi.c           |  20 +---
 drivers/platform/x86/toshiba-wmi.c       |  15 +--
 drivers/platform/x86/wmi.c               | 143 ++++++-----------------
 include/linux/acpi.h                     |   3 +-
 11 files changed, 53 insertions(+), 239 deletions(-)

--
2.39.2