Commit a36f8637 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by sanglipeng
Browse files

iio: ms5611: Simplify IO callback parameters

stable inclusion
from stable-v5.10.157
commit 879139bc7afbb4f53aa6e268b3e7a30601d6ba9e
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7MU59

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=879139bc7afbb4f53aa6e268b3e7a30601d6ba9e



--------------------------------

[ Upstream commit dc19fa63 ]

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: default avatarLars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20211020142110.7060-1-lars@metafoo.de


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Stable-dep-of: 17f442e7 ("iio: pressure: ms5611: fixed value compensation bug")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent f291bd86
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment