diff options
author | Nuno Sa <nuno.sa@analog.com> | 2023-12-07 13:39:28 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2023-12-10 12:41:00 +0100 |
commit | b67cc85d45d5d2894d0e2812bba27d7b23befbe6 (patch) | |
tree | ccdd72cea91f5f49d4e7cc03ea632d4be33f57ae /drivers/iio | |
parent | iio: adc: ad9467: fix scale setting (diff) | |
download | linux-b67cc85d45d5d2894d0e2812bba27d7b23befbe6.tar.xz linux-b67cc85d45d5d2894d0e2812bba27d7b23befbe6.zip |
iio: adc: ad9467: use spi_get_device_match_data()
Make use of spi_get_device_match_data() to simplify things.
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20231207-iio-backend-prep-v2-5-a4a33bc4d70e@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/adc/ad9467.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/iio/adc/ad9467.c b/drivers/iio/adc/ad9467.c index f668313730cb..b16d28c1adcb 100644 --- a/drivers/iio/adc/ad9467.c +++ b/drivers/iio/adc/ad9467.c @@ -454,9 +454,7 @@ static int ad9467_probe(struct spi_device *spi) unsigned int id; int ret; - info = of_device_get_match_data(&spi->dev); - if (!info) - info = (void *)spi_get_device_id(spi)->driver_data; + info = spi_get_device_match_data(spi); if (!info) return -ENODEV; |