diff options
Diffstat (limited to 'drivers/iio/potentiometer/max5481.c')
-rw-r--r-- | drivers/iio/potentiometer/max5481.c | 4 |
1 files changed, 2 insertions, 2 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); |