Message ID | 20201119100748.57689-2-alexandru.ardelean@analog.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2,1/4] iio: adc: ad7887: convert dual-channel mode to DT/ACPI | expand |
diff --git a/drivers/iio/adc/ad7887.c b/drivers/iio/adc/ad7887.c index 06f684c053a0..c28f704301d9 100644 --- a/drivers/iio/adc/ad7887.c +++ b/drivers/iio/adc/ad7887.c @@ -269,13 +269,12 @@ static int ad7887_probe(struct spi_device *spi) return ret; } - st->chip_info = - &ad7887_chip_info_tbl[spi_get_device_id(spi)->driver_data]; + st->chip_info = &ad7887_chip_info_tbl[ID_AD7887]; spi_set_drvdata(spi, indio_dev); st->spi = spi; - indio_dev->name = spi_get_device_id(spi)->name; + indio_dev->name = "ad7887"; indio_dev->info = &ad7887_info; indio_dev->modes = INDIO_DIRECT_MODE;
The driver currently supports a single part. So we don't need to do any extra matching based on what the SPI framework has found during probe. This should make the driver probe-able via other mechanisms like greybus. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> --- drivers/iio/adc/ad7887.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)