Skip to content

Commit 27cc291

Browse files
Wer-Wolfij-intel
authored andcommitted
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 <[email protected]> Tested-by: James Seo <[email protected]> Reviewed-by: James Seo <[email protected]> Signed-off-by: Armin Wolf <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
1 parent c86e269 commit 27cc291

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/hwmon/hp-wmi-sensors.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,7 @@ static int hp_wmi_update_info(struct hp_wmi_sensors *state,
11971197
if (time_after(jiffies, info->last_updated + HZ)) {
11981198
mutex_lock(&state->lock);
11991199

1200-
wobj = hp_wmi_get_wobj(HP_WMI_NUMERIC_SENSOR_GUID, instance);
1200+
wobj = wmidev_block_query(state->wdev, instance);
12011201
if (!wobj) {
12021202
ret = -EIO;
12031203
goto out_unlock;
@@ -1745,7 +1745,7 @@ static int init_numeric_sensors(struct hp_wmi_sensors *state,
17451745
return -ENOMEM;
17461746

17471747
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);
17491749
if (!wobj)
17501750
return -EIO;
17511751

0 commit comments

Comments
 (0)