diff options
author | Julia Lawall <Julia.Lawall@inria.fr> | 2021-02-09 22:13:15 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-03-11 20:47:07 +0000 |
commit | b624fd14a9275bd546b63cf103cee6c9f57a4f55 (patch) | |
tree | 91b63115105cd40d6c147ac3e6b0b0c4eacf4902 /drivers/iio/potentiometer | |
parent | 8827faab2c8b52e848071a039a945db6f3ae8365 (diff) | |
download | linux-stable-b624fd14a9275bd546b63cf103cee6c9f57a4f55.tar.gz linux-stable-b624fd14a9275bd546b63cf103cee6c9f57a4f55.tar.bz2 linux-stable-b624fd14a9275bd546b63cf103cee6c9f57a4f55.zip |
iio: use getter/setter functions
Use getter and setter functions, for a variety of data types.
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Link: https://lore.kernel.org/r/20210209211315.1261791-1-Julia.Lawall@inria.fr
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/potentiometer')
-rw-r--r-- | drivers/iio/potentiometer/max5481.c | 4 | ||||
-rw-r--r-- | drivers/iio/potentiometer/max5487.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/iio/potentiometer/max5481.c b/drivers/iio/potentiometer/max5481.c index a88ed0eb3adc..6e22b538091f 100644 --- a/drivers/iio/potentiometer/max5481.c +++ b/drivers/iio/potentiometer/max5481.c @@ -136,7 +136,7 @@ static int max5481_probe(struct spi_device *spi) if (!indio_dev) return -ENOMEM; - dev_set_drvdata(&spi->dev, indio_dev); + spi_set_drvdata(spi, indio_dev); data = iio_priv(indio_dev); data->spi = spi; @@ -163,7 +163,7 @@ static int max5481_probe(struct spi_device *spi) static int max5481_remove(struct spi_device *spi) { - struct iio_dev *indio_dev = dev_get_drvdata(&spi->dev); + struct iio_dev *indio_dev = spi_get_drvdata(spi); struct max5481_data *data = iio_priv(indio_dev); iio_device_unregister(indio_dev); diff --git a/drivers/iio/potentiometer/max5487.c b/drivers/iio/potentiometer/max5487.c index 7ec51976ec99..1c0d46a96200 100644 --- a/drivers/iio/potentiometer/max5487.c +++ b/drivers/iio/potentiometer/max5487.c @@ -92,7 +92,7 @@ static int max5487_spi_probe(struct spi_device *spi) if (!indio_dev) return -ENOMEM; - dev_set_drvdata(&spi->dev, indio_dev); + spi_set_drvdata(spi, indio_dev); data = iio_priv(indio_dev); data->spi = spi; @@ -114,7 +114,7 @@ static int max5487_spi_probe(struct spi_device *spi) static int max5487_spi_remove(struct spi_device *spi) { - struct iio_dev *indio_dev = dev_get_drvdata(&spi->dev); + struct iio_dev *indio_dev = spi_get_drvdata(spi); iio_device_unregister(indio_dev); |