Commit 3bdb96c9 authored by Nuno Sa's avatar Nuno Sa Committed by Jonathan Cameron

iio: temperature: ltc2983: make use of spi_get_device_match_data()

Use spi_get_device_match_data() as it simplifies the code. No functional
change intended...
Signed-off-by: default avatarNuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240222-ltc2983-misc-improv-v1-1-cf7d4457e98c@analog.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent df621530
...@@ -1614,9 +1614,7 @@ static int ltc2983_probe(struct spi_device *spi) ...@@ -1614,9 +1614,7 @@ static int ltc2983_probe(struct spi_device *spi)
st = iio_priv(indio_dev); st = iio_priv(indio_dev);
st->info = device_get_match_data(&spi->dev); st->info = spi_get_device_match_data(spi);
if (!st->info)
st->info = (void *)spi_get_device_id(spi)->driver_data;
if (!st->info) if (!st->info)
return -ENODEV; return -ENODEV;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment