Skip to content

Commit d103337

Browse files
bijudasgroeck
authored andcommitted
hwmon: (tmp513) Fix the channel number in tmp51x_is_visible()
The supported channels for this driver are {0..3}. Fix the incorrect channel in tmp51x_is_visible(). Reported-by: Guenter Roeck <linux@roeck-us.net> Closes: https://lore.kernel.org/all/ea0eccc0-a29f-41e4-9049-a1a13f8b16f1@roeck-us.net/ Fixes: 59dfa75 ("hwmon: Add driver for Texas Instruments TMP512/513 sensor chips.") Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/r/20230824204456.401580-2-biju.das.jz@bp.renesas.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
1 parent dadca53 commit d103337

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hwmon/tmp513.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ static umode_t tmp51x_is_visible(const void *_data,
434434

435435
switch (type) {
436436
case hwmon_temp:
437-
if (data->id == tmp512 && channel == 4)
437+
if (data->id == tmp512 && channel == 3)
438438
return 0;
439439
switch (attr) {
440440
case hwmon_temp_input:

0 commit comments

Comments
 (0)