diff options
| author | Tony O'Brien <tony.obrien@alliedtelesis.co.nz> | 2023-02-22 13:52:27 +1300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-22 13:27:10 +0100 |
| commit | ad2ae163934b50c58f9141066753e69ef181d234 (patch) | |
| tree | 66d70b9d81e92910f142a6a5f52e5517e354ef46 /drivers | |
| parent | 7b5179890e585a5dc524f92b0193b2756b059e92 (diff) | |
| download | linux-ad2ae163934b50c58f9141066753e69ef181d234.tar.gz linux-ad2ae163934b50c58f9141066753e69ef181d234.tar.bz2 linux-ad2ae163934b50c58f9141066753e69ef181d234.zip | |
hwmon: (adt7475) Display smoothing attributes in correct order
[ Upstream commit 5f8d1e3b6f9b5971f9c06d5846ce00c49e3a8d94 ]
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: 8f05bcc33e74 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/hwmon/adt7475.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/adt7475.c b/drivers/hwmon/adt7475.c index 0a87c5b51286..bde5fe10a95a 100644 --- a/drivers/hwmon/adt7475.c +++ b/drivers/hwmon/adt7475.c @@ -554,11 +554,11 @@ static ssize_t show_temp_st(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; } |
