Commit b67cc85d authored by Nuno Sa's avatar Nuno Sa Committed by Jonathan Cameron
Browse files

iio: adc: ad9467: use spi_get_device_match_data()



Make use of spi_get_device_match_data() to simplify things.

Reviewed-by: default avatarDavid Lechner <dlechner@baylibre.com>
Signed-off-by: default avatarNuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20231207-iio-backend-prep-v2-5-a4a33bc4d70e@analog.com


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent b73f08bb
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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;