Used bits in temperature source registers, and thus temp_mask, start with 1.
Valid sources in reg_temp_alternate[] start with 0. Add missing offset.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* is set.
*/
for (i = 0; i < 32; i++) {
* is set.
*/
for (i = 0; i < 32; i++) {
- if (!(data->temp_mask & BIT(i)))
+ if (!(data->temp_mask & BIT(i + 1)))
continue;
if (!reg_temp_alternate[i])
continue;
continue;
if (!reg_temp_alternate[i])
continue;