]> git.baikalelectronics.ru Git - kernel.git/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)
committerGuenter Roeck <linux@roeck-us.net>
Thu, 8 Sep 2022 18:54:44 +0000 (11:54 -0700)
commit1af728f348478f1e2c3d6c10e319c1a0166928ec
treef836015c7fe3386b5764e827e3380145358f86db
parent621b7165a6299efe3fb645465ecf47fe0530e43b
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: e6dc6d6dd8bd ("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>
drivers/hwmon/mr75203.c