w1: ds2438: fixing bug that would always get page0
authorLuiz Sampaio <sampaio.ime@gmail.com>
Wed, 19 May 2021 22:30:44 +0000 (19:30 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:05:39 +0000 (16:05 +0200)
commit20c62caf2eaf05580397368bb813dff19f59d0e9
tree222ed4a1c29ec2744989f6f1767253bd17d71e39
parent8e8d910e9a3a7fba86140aff4924c30955ab228b
w1: ds2438: fixing bug that would always get page0

[ Upstream commit 1f5e7518f063728aee0679c5086b92d8ea429e11 ]

The purpose of the w1_ds2438_get_page function is to get the register
values at the page passed as the pageno parameter. However, the page0 was
hardcoded, such that the function always returned the page0 contents. Fixed
so that the function can retrieve any page.

Signed-off-by: Luiz Sampaio <sampaio.ime@gmail.com>
Link: https://lore.kernel.org/r/20210519223046.13798-5-sampaio.ime@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/w1/slaves/w1_ds2438.c