]> www.infradead.org Git - users/jedix/linux-maple.git/commit
hwmon: (lm95234) Use find_closest to find matching update interval
authorGuenter Roeck <linux@roeck-us.net>
Wed, 10 Jul 2024 04:23:30 +0000 (21:23 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 31 Jul 2024 17:43:52 +0000 (10:43 -0700)
commite38b05f0a2fd5b92341d366c9f4f74301cd41ac6
treea383966716421a11d4da129d5b542d082d90c92c
parent8abff91c6173b175bda3381bdb14981249502434
hwmon: (lm95234) Use find_closest to find matching update interval

Use find_closest() instead of manually coding it to find best update
interval.

Since find_closest() uses rounding to find the best match, the resulting
update interval will now reflect the update interval that is closest to
the requested value, not the value that is lower or equal to the requested
value.

Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/lm95234.c