Skip to content

Commit

Permalink
hwmon: (tmp513) Fix the channel number in tmp51x_is_visible()
Browse files Browse the repository at this point in the history
[ Upstream commit d103337 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Biju Das authored and gregkh committed Sep 13, 2023
1 parent 8b2fb4b commit 23a7b87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hwmon/tmp513.c
Expand Up @@ -434,7 +434,7 @@ static umode_t tmp51x_is_visible(const void *_data,

switch (type) {
case hwmon_temp:
if (data->id == tmp512 && channel == 4)
if (data->id == tmp512 && channel == 3)
return 0;
switch (attr) {
case hwmon_temp_input:
Expand Down

0 comments on commit 23a7b87

Please sign in to comment.