mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 05:44:11 +00:00
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: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20240222-ltc2983-misc-improv-v1-1-cf7d4457e98c@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
df62153046
commit
3bdb96c9d5
1 changed files with 1 additions and 3 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue