diff options
author | Lars-Peter Clausen | 2016-10-19 19:06:57 +0200 |
---|---|---|
committer | Jonathan Cameron | 2016-10-23 20:34:12 +0200 |
commit | 063a51c5bdefaf7972c6ee7945b05eeb7a842961 (patch) | |
tree | 52ffb819fe7aef34c527f435c5c7cfea3ede6d9e /drivers/staging/iio/adc/ad7606_par.c | |
parent | staging:iio:ad7606: Remove unused int_vref_mv field (diff) | |
download | kernel-qcow2-linux-063a51c5bdefaf7972c6ee7945b05eeb7a842961.tar.gz kernel-qcow2-linux-063a51c5bdefaf7972c6ee7945b05eeb7a842961.tar.xz kernel-qcow2-linux-063a51c5bdefaf7972c6ee7945b05eeb7a842961.zip |
staging:iio:ad7606: Remove redundant name field from ad7606_chip_info
The name field in the ad7606_chip_info struct is set to the same value as
the as the name field in the corresponding {platform,spi}_device_id table
entry. Remove it from the ad7606_chip_info struct and pass the name from
the ID to the probe function. This slightly reduces the size of the
chip_info table and adding new entries requires less boilerplate.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging/iio/adc/ad7606_par.c')
-rw-r--r-- | drivers/staging/iio/adc/ad7606_par.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/iio/adc/ad7606_par.c b/drivers/staging/iio/adc/ad7606_par.c index 84d23930fdde..0a23cd923415 100644 --- a/drivers/staging/iio/adc/ad7606_par.c +++ b/drivers/staging/iio/adc/ad7606_par.c @@ -49,6 +49,7 @@ static const struct ad7606_bus_ops ad7606_par8_bops = { static int ad7606_par_probe(struct platform_device *pdev) { + const struct platform_device_id *id = platform_get_device_id(pdev); struct resource *res; struct iio_dev *indio_dev; void __iomem *addr; @@ -69,7 +70,7 @@ static int ad7606_par_probe(struct platform_device *pdev) remap_size = resource_size(res); indio_dev = ad7606_probe(&pdev->dev, irq, addr, - platform_get_device_id(pdev)->driver_data, + id->name, id->driver_data, remap_size > 1 ? &ad7606_par16_bops : &ad7606_par8_bops); |