Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hwmon: (hp-wmi-sensors) Use the WMI bus API when accessing sensors

Since the driver already binds to HP_WMI_NUMERIC_SENSOR_GUID, using
wmidev_block_query() allows for faster sensor access.

Acked-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: James Seo <james@equiv.tech>
Reviewed-by: James Seo <james@equiv.tech>
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20250216193251.866125-2-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

authored by

Armin Wolf and committed by
Ilpo Järvinen
27cc2914 c86e269c

+2 -2
+2 -2
drivers/hwmon/hp-wmi-sensors.c
··· 1197 1197 if (time_after(jiffies, info->last_updated + HZ)) { 1198 1198 mutex_lock(&state->lock); 1199 1199 1200 - wobj = hp_wmi_get_wobj(HP_WMI_NUMERIC_SENSOR_GUID, instance); 1200 + wobj = wmidev_block_query(state->wdev, instance); 1201 1201 if (!wobj) { 1202 1202 ret = -EIO; 1203 1203 goto out_unlock; ··· 1745 1745 return -ENOMEM; 1746 1746 1747 1747 for (i = 0, info = info_arr; i < icount; i++, info++) { 1748 - wobj = hp_wmi_get_wobj(HP_WMI_NUMERIC_SENSOR_GUID, i); 1748 + wobj = wmidev_block_query(state->wdev, i); 1749 1749 if (!wobj) 1750 1750 return -EIO; 1751 1751