projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b73f08b
)
iio: adc: ad9467: use spi_get_device_match_data()
author
Nuno Sa
<nuno.sa@analog.com>
Thu, 7 Dec 2023 12:39:28 +0000
(13:39 +0100)
committer
Jonathan Cameron
<Jonathan.Cameron@huawei.com>
Sun, 10 Dec 2023 11:41:00 +0000
(11:41 +0000)
Make use of spi_get_device_match_data() to simplify things.
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link:
https://lore.kernel.org/r/20231207-iio-backend-prep-v2-5-a4a33bc4d70e@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad9467.c
patch
|
blob
|
history
diff --git
a/drivers/iio/adc/ad9467.c
b/drivers/iio/adc/ad9467.c
index f668313730cb68c5fc8a0a0cbfdae6ccd2b52d55..b16d28c1adcb0d6c71b3f8e9fa3132998679ca4b 100644
(file)
--- 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;