iio: pressure: ms5611: fixed value compensation bug
authorMitja Spes <mitja@lxnav.com>
Fri, 21 Oct 2022 13:58:20 +0000 (15:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Dec 2022 16:41:00 +0000 (17:41 +0100)
commitcdee3136c966e207d3993695658b1c8f99113449
tree664c884a4b880291aab9a245705afd7e86d28877
parent5d6696e79d9441892ee284e758cc21039b532d1e
iio: pressure: ms5611: fixed value compensation bug

[ Upstream commit 17f442e7e47579d3881fc4d47354eaef09302e6f ]

When using multiple instances of this driver the compensation PROM was
overwritten by the last initialized sensor. Now each sensor has own PROM
storage.

Signed-off-by: Mitja Spes <mitja@lxnav.com>
Fixes: 9690d81a02dc ("iio: pressure: ms5611: add support for MS5607 temperature and pressure sensor")
Link: https://lore.kernel.org/r/20221021135827.1444793-2-mitja@lxnav.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iio/pressure/ms5611.h
drivers/iio/pressure/ms5611_core.c