From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 01BB01C03 for ; Mon, 20 Mar 2023 15:01:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6FE73C433EF; Mon, 20 Mar 2023 15:01:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1679324461; bh=D1MJIzTzJT1G7xO/xGA6pP/SjeSN4+9+iKGMv23jgr4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0PzUtrIbQkNRjKiZAQ2JlFhKxAzWdjFf6iLDgHGC81LoHXpjDRvvxBckQr4KVQz3o rvp5hc/tyFc16i4uxj/LU/BOVCdG8fGApAMxGpmFSRTe1MJCekrRiM/DjOCJZh83hY KubfR169ITR1yqnQsphp0IxtpqDxAL3igNOZ/V90= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Tony OBrien , Guenter Roeck , Sasha Levin Subject: [PATCH 5.4 32/60] hwmon: (adt7475) Display smoothing attributes in correct order Date: Mon, 20 Mar 2023 15:54:41 +0100 Message-Id: <20230320145432.278602371@linuxfoundation.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230320145430.861072439@linuxfoundation.org> References: <20230320145430.861072439@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Tony O'Brien [ 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 Link: https://lore.kernel.org/r/20230222005228.158661-2-tony.obrien@alliedtelesis.co.nz Signed-off-by: Guenter Roeck Signed-off-by: Sasha Levin --- drivers/hwmon/adt7475.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/adt7475.c b/drivers/hwmon/adt7475.c index 01c2eeb02aa96..20a4118bb3e1c 100644 --- a/drivers/hwmon/adt7475.c +++ b/drivers/hwmon/adt7475.c @@ -552,11 +552,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; } -- 2.39.2