Use spi_get_device_match_data() as it simplifies the code. No functional change intended... Signed-off-by: Nuno Sa <nuno.sa@xxxxxxxxxx> --- drivers/iio/temperature/ltc2983.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/iio/temperature/ltc2983.c b/drivers/iio/temperature/ltc2983.c index fcb96c44d954..acc631857e27 100644 --- a/drivers/iio/temperature/ltc2983.c +++ b/drivers/iio/temperature/ltc2983.c @@ -1614,9 +1614,7 @@ static int ltc2983_probe(struct spi_device *spi) st = iio_priv(indio_dev); - st->info = device_get_match_data(&spi->dev); - if (!st->info) - st->info = (void *)spi_get_device_id(spi)->driver_data; + st->info = spi_get_device_match_data(spi); if (!st->info) return -ENODEV; -- 2.43.2