Skip to content

Commit

Permalink
hwmon: (adt7475) Display smoothing attributes in correct order
Browse files Browse the repository at this point in the history
Throughout the ADT7475 driver, attributes relating to the temperature
sensors are displayed in the order Remote 1, Local, Remote 2.  Make
temp_st_show() conform to this expectation so that values set by
temp_st_store() can be displayed using the correct attribute.

Fixes: 8f05bcc ("hwmon: (adt7475) temperature smoothing")
Signed-off-by: Tony O'Brien <tony.obrien@alliedtelesis.co.nz>
Link: https://lore.kernel.org/r/20230222005228.158661-2-tony.obrien@alliedtelesis.co.nz
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Tony O'Brien authored and Guenter Roeck committed Mar 5, 2023
1 parent fe15c26 commit 5f8d1e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/hwmon/adt7475.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,11 +556,11 @@ static ssize_t temp_st_show(struct device *dev, struct device_attribute *attr,
val = data->enh_acoustics[0] & 0xf;
break;
case 1:
val = (data->enh_acoustics[1] >> 4) & 0xf;
val = data->enh_acoustics[1] & 0xf;
break;
case 2:
default:
val = data->enh_acoustics[1] & 0xf;
val = (data->enh_acoustics[1] >> 4) & 0xf;
break;
}

Expand Down

0 comments on commit 5f8d1e3

Please sign in to comment.