From: Nuno Sa Date: Thu, 7 Dec 2023 12:39:28 +0000 (+0100) Subject: iio: adc: ad9467: use spi_get_device_match_data() X-Git-Tag: v6.8-rc1~62^2~53^2~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b67cc85d45d5d2894d0e2812bba27d7b23befbe6;p=thirdparty%2Fkernel%2Flinux.git iio: adc: ad9467: use spi_get_device_match_data() Make use of spi_get_device_match_data() to simplify things. Reviewed-by: David Lechner Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20231207-iio-backend-prep-v2-5-a4a33bc4d70e@analog.com Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/adc/ad9467.c b/drivers/iio/adc/ad9467.c index f668313730cb6..b16d28c1adcb0 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;