]> git.baikalelectronics.ru Git - kernel.git/commit
iio: ms5611: Simplify IO callback parameters
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 20 Oct 2021 14:21:10 +0000 (16:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Dec 2022 10:23:00 +0000 (11:23 +0100)
commita988bb69dfd5ee745a277c33a62b812a9e2cd523
tree20cbff3ce9d2f043be17ccbe8512d2666008bd3c
parent64cce4a1f03e1d109a6664ebc5ae0d66e8151390
iio: ms5611: Simplify IO callback parameters

[ Upstream commit d7cf39dac8b1fb7e628229253e39c0ab8005b606 ]

The ms5611 passes &indio_dev->dev as a parameter to all its IO callbacks
only to directly cast the struct device back to struct iio_dev. And the
struct iio_dev is then only used to get the drivers state struct.

Simplify this a bit by passing the state struct directly. This makes it a
bit easier to follow what the code is doing.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20211020142110.7060-1-lars@metafoo.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Stable-dep-of: 80534da2e070 ("iio: pressure: ms5611: fixed value compensation bug")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iio/pressure/ms5611.h
drivers/iio/pressure/ms5611_core.c
drivers/iio/pressure/ms5611_i2c.c
drivers/iio/pressure/ms5611_spi.c