]> git.itanic.dy.fi Git - linux-stable/commit
hwmon: (mr75203) update pvt->v_num and vm_num to the actual number of used sensors
authorEliav Farber <farbere@amazon.com>
Thu, 8 Sep 2022 15:24:31 +0000 (15:24 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2022 09:30:07 +0000 (11:30 +0200)
commita02267ebb247ba3c6d7909b03c07b55ae7234415
tree0450acd27b778a829d0475acde40a77fe0676cee
parent000f3353231e1596634c04b09ee29ac675bfc19a
hwmon: (mr75203) update pvt->v_num and vm_num to the actual number of used sensors

[ Upstream commit bb9195bd6664d94d71647631593e09f705ff5edd ]

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: 9d823351a337 ("hwmon: Add hardware monitoring driver for Moortec MR75203 PVT controller")
Signed-off-by: Eliav Farber <farbere@amazon.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220908152449.35457-4-farbere@amazon.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwmon/mr75203.c