Skip to content

Commit bb9195b

Browse files
Eliav Farbergroeck
authored andcommitted
hwmon: (mr75203) update pvt->v_num and vm_num to the actual number of used sensors
This issue is relevant when "intel,vm-map" is set in device-tree, and defines a lower number of VMs than actually supported. This change is needed for all places that use pvt->v_num or vm_num later on in the code. Fixes: 9d82335 ("hwmon: Add hardware monitoring driver for Moortec MR75203 PVT controller") Signed-off-by: Eliav Farber <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
1 parent 81114fc commit bb9195b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/hwmon/mr75203.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,8 @@ static int mr75203_probe(struct platform_device *pdev)
595595
if (pvt->vm_idx[i] >= vm_num ||
596596
pvt->vm_idx[i] == 0xff) {
597597
num = i;
598+
pvt->v_num = i;
599+
vm_num = i;
598600
break;
599601
}
600602
}

0 commit comments

Comments
 (0)