diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2021-10-20 17:21:10 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-11-17 20:51:33 +0300 |
commit | dc19fa63ad80a636fdbc1a02153d1ab140cb901f (patch) | |
tree | e4b4fff5ba940b43128a7e3ef8f89300218e6f27 /drivers/iio/pressure/ms5611.h | |
parent | ba1287e73182f2521d4fc5c0809620ed06652796 (diff) | |
download | linux-dc19fa63ad80a636fdbc1a02153d1ab140cb901f.tar.xz |
iio: ms5611: Simplify IO callback parameters
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>
Diffstat (limited to 'drivers/iio/pressure/ms5611.h')
-rw-r--r-- | drivers/iio/pressure/ms5611.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iio/pressure/ms5611.h b/drivers/iio/pressure/ms5611.h index 86b1c4b1820d..cbc9349c342a 100644 --- a/drivers/iio/pressure/ms5611.h +++ b/drivers/iio/pressure/ms5611.h @@ -50,9 +50,9 @@ struct ms5611_state { const struct ms5611_osr *pressure_osr; const struct ms5611_osr *temp_osr; - int (*reset)(struct device *dev); - int (*read_prom_word)(struct device *dev, int index, u16 *word); - int (*read_adc_temp_and_pressure)(struct device *dev, + int (*reset)(struct ms5611_state *st); + int (*read_prom_word)(struct ms5611_state *st, int index, u16 *word); + int (*read_adc_temp_and_pressure)(struct ms5611_state *st, s32 *temp, s32 *pressure); struct ms5611_chip_info *chip_info; |