summaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorTony O'Brien <tony.obrien@alliedtelesis.co.nz>2023-02-22 03:52:27 +0300
committerGuenter Roeck <linux@roeck-us.net>2023-03-06 02:08:06 +0300
commit5f8d1e3b6f9b5971f9c06d5846ce00c49e3a8d94 (patch)
treecfb5d4dbbc8dc6cf073516f3cec42e3f1cc83cac /drivers/hwmon
parentfe15c26ee26efa11741a7b632e9f23b01aca4cc6 (diff)
downloadlinux-5f8d1e3b6f9b5971f9c06d5846ce00c49e3a8d94.tar.xz
hwmon: (adt7475) Display smoothing attributes in correct order
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>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/adt7475.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/adt7475.c b/drivers/hwmon/adt7475.c
index 51b3d16c3223..77222c35a38e 100644
--- a/drivers/hwmon/adt7475.c
+++ b/drivers/hwmon/adt7475.c
@@ -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;
}