Skip to content

Commit 54685ab

Browse files
gbulozgroeck
authored andcommitted
hwmon: (nct7802) Fix for temp6 (PECI1) processed even if PECI1 disabled
Because of hex value 0x46 used instead of decimal 46, the temp6 (PECI1) temperature is always declared visible and then displayed even if disabled in the chip Signed-off-by: Gilles Buloz <[email protected]> Link: https://lore.kernel.org/r/DU0PR10MB62526435ADBC6A85243B90E08002A@DU0PR10MB6252.EURPRD10.PROD.OUTLOOK.COM Fixes: fcdc573 ("hwmon: (nct7802) add temperature sensor type attribute") Cc: [email protected] Signed-off-by: Guenter Roeck <[email protected]>
1 parent 13558a2 commit 54685ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hwmon/nct7802.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ static umode_t nct7802_temp_is_visible(struct kobject *kobj,
725725
if (index >= 38 && index < 46 && !(reg & 0x01)) /* PECI 0 */
726726
return 0;
727727

728-
if (index >= 0x46 && (!(reg & 0x02))) /* PECI 1 */
728+
if (index >= 46 && !(reg & 0x02)) /* PECI 1 */
729729
return 0;
730730

731731
return attr->mode;

0 commit comments

Comments
 (0)