iio: Use named initializers for device_id structures
Subsystems (74)
cover iio: Use named initializers for device_id structures
Hello,
the first patch is a follow up for making iio's i2c_device_id arrays use named initializers. The two drivers adapted in it were missed before because they were not yet in the tree I used to prepare the patch. The remainder is a similar adaption for spi_device_id. Instead of adapting arrays with a single entry and .driver_data, rework these to not use .driver_data.
The ad9523 driver is a bit special here. It can only probe devices that have platform data. A device instantiated using dt never has platform data, so this driver only works for boards registering the device using a spi_board_info struct. There is no such board, and there never was one. So an alternative is to just drop this driver?!
I was unsure if I should post the staging patches in a separate series, I hope it's fine to include them here.
Best regards
Uwe
Uwe Kleine-König (The Capable Hub) (13):
iio: Initialize i2c_device_id arrays using member names (part 2)
iio: adc: ti-tsc2046: Simplify device abstraction
iio: adc: ti-tsc2046: Drop unused member from private data
iio: adc: max1241: Simplify device abstraction
iio: dac: max5522: Simplify device abstraction
iio: frequency: ad9523: Simplify driver a bit
iio: imu: adis16550: Simplify device abstraction
iio: magnetometer: hmc5843: Simplify device abstraction
iio: accel: bmc150: Explicitly set spi .driver_data
iio: Drop unused assignment of spi_device_id driver data
iio: Initialize spi_device_id arrays using member names
staging: iio: Drop unused assignment of spi_device_id driver data
staging: iio: Initialize spi_device_id arrays using member names
drivers/iio/accel/adxl345_spi.c | 4 +- drivers/iio/accel/adxl355_spi.c | 4 +- drivers/iio/accel/adxl367_spi.c | 2 +- drivers/iio/accel/adxl372_spi.c | 4 +- drivers/iio/accel/adxl380_spi.c | 8 +- drivers/iio/accel/bma220_spi.c | 2 +- drivers/iio/accel/bma400_spi.c | 2 +- drivers/iio/accel/bmc150-accel-spi.c | 18 +-- drivers/iio/accel/bmi088-accel-spi.c | 6 +- drivers/iio/accel/fxls8962af-spi.c | 4 +- drivers/iio/accel/kxsd9-spi.c | 2 +- drivers/iio/accel/mma7455_spi.c | 4 +- drivers/iio/accel/sca3000.c | 8 +- drivers/iio/accel/sca3300.c | 4 +- drivers/iio/accel/st_accel_spi.c | 40 +++--- drivers/iio/adc/ad4000.c | 62 ++++----- drivers/iio/adc/ad4030.c | 14 +- drivers/iio/adc/ad4080.c | 22 +-- drivers/iio/adc/ad4130.c | 12 +- drivers/iio/adc/ad4134.c | 2 +- drivers/iio/adc/ad4170-4.c | 6 +- drivers/iio/adc/ad4851.c | 18 +-- drivers/iio/adc/ad7091r8.c | 6 +- drivers/iio/adc/ad7124.c | 4 +- drivers/iio/adc/ad7173.c | 26 ++-- drivers/iio/adc/ad7191.c | 2 +- drivers/iio/adc/ad7192.c | 10 +- drivers/iio/adc/ad7266.c | 4 +- drivers/iio/adc/ad7280a.c | 2 +- drivers/iio/adc/ad7292.c | 2 +- drivers/iio/adc/ad7298.c | 2 +- drivers/iio/adc/ad7380.c | 36 ++--- drivers/iio/adc/ad7476.c | 60 ++++---- drivers/iio/adc/ad7606_spi.c | 22 +-- drivers/iio/adc/ad7766.c | 12 +- drivers/iio/adc/ad7768-1.c | 8 +- drivers/iio/adc/ad7780.c | 8 +- drivers/iio/adc/ad7791.c | 10 +- drivers/iio/adc/ad7793.c | 18 +-- drivers/iio/adc/ad7887.c | 2 +- drivers/iio/adc/ad7923.c | 14 +- drivers/iio/adc/ad7944.c | 6 +- drivers/iio/adc/ad7949.c | 6 +- drivers/iio/adc/ad9467.c | 14 +- drivers/iio/adc/ade9000.c | 2 +- drivers/iio/adc/hi8435.c | 2 +- drivers/iio/adc/max1027.c | 12 +- drivers/iio/adc/max1118.c | 6 +- drivers/iio/adc/max11205.c | 4 +- drivers/iio/adc/max11410.c | 2 +- drivers/iio/adc/max1241.c | 8 +- drivers/iio/adc/max14001.c | 4 +- drivers/iio/adc/mcp320x.c | 26 ++-- drivers/iio/adc/mcp3564.c | 24 ++-- drivers/iio/adc/mcp3911.c | 14 +- drivers/iio/adc/rohm-bd79112.c | 2 +- drivers/iio/adc/rtq6056.c | 4 +- drivers/iio/adc/ti-adc0832.c | 8 +- drivers/iio/adc/ti-adc084s021.c | 2 +- drivers/iio/adc/ti-adc108s102.c | 2 +- drivers/iio/adc/ti-adc12138.c | 6 +- drivers/iio/adc/ti-adc128s052.c | 24 ++-- drivers/iio/adc/ti-adc161s626.c | 4 +- drivers/iio/adc/ti-ads1018.c | 4 +- drivers/iio/adc/ti-ads124s08.c | 4 +- drivers/iio/adc/ti-ads1298.c | 2 +- drivers/iio/adc/ti-ads131e08.c | 6 +- drivers/iio/adc/ti-ads131m02.c | 10 +- drivers/iio/adc/ti-ads7950.c | 24 ++-- drivers/iio/adc/ti-ads8688.c | 4 +- drivers/iio/adc/ti-lmp92064.c | 2 +- drivers/iio/adc/ti-tlc4541.c | 4 +- drivers/iio/adc/ti-tsc2046.c | 12 +- drivers/iio/addac/ad74115.c | 2 +- drivers/iio/amplifiers/ad8366.c | 26 ++-- drivers/iio/amplifiers/ada4250.c | 2 +- drivers/iio/chemical/bme680_spi.c | 2 +- drivers/iio/chemical/ens160_spi.c | 2 +- drivers/iio/dac/ad3530r.c | 8 +- drivers/iio/dac/ad5064.c | 32 ++--- drivers/iio/dac/ad5360.c | 16 +-- drivers/iio/dac/ad5380.c | 32 ++--- drivers/iio/dac/ad5446-spi.c | 62 ++++----- drivers/iio/dac/ad5449.c | 14 +- drivers/iio/dac/ad5504.c | 4 +- drivers/iio/dac/ad5624r_spi.c | 12 +- drivers/iio/dac/ad5706r.c | 2 +- drivers/iio/dac/ad5755.c | 10 +- drivers/iio/dac/ad5758.c | 2 +- drivers/iio/dac/ad5761.c | 8 +- drivers/iio/dac/ad5764.c | 8 +- drivers/iio/dac/ad5766.c | 4 +- drivers/iio/dac/ad5770r.c | 2 +- drivers/iio/dac/ad5791.c | 10 +- drivers/iio/dac/ad7293.c | 2 +- drivers/iio/dac/ad7303.c | 2 +- drivers/iio/dac/ad8801.c | 4 +- drivers/iio/dac/ad9739a.c | 2 +- drivers/iio/dac/ltc1660.c | 4 +- drivers/iio/dac/ltc2632.c | 44 +++--- drivers/iio/dac/ltc2664.c | 4 +- drivers/iio/dac/ltc2688.c | 2 +- drivers/iio/dac/max22007.c | 2 +- drivers/iio/dac/max5522.c | 31 +---- drivers/iio/dac/mcp4821.c | 12 +- drivers/iio/dac/mcp4922.c | 8 +- drivers/iio/dac/rohm-bd79703.c | 8 +- drivers/iio/dac/ti-dac082s085.c | 12 +- drivers/iio/dac/ti-dac7311.c | 6 +- drivers/iio/dac/ti-dac7612.c | 2 +- drivers/iio/filter/admv8818.c | 2 +- drivers/iio/frequency/ad9523.c | 3 +- drivers/iio/frequency/adf4350.c | 4 +- drivers/iio/frequency/adf4371.c | 4 +- drivers/iio/frequency/adf4377.c | 4 +- drivers/iio/frequency/admv1013.c | 2 +- drivers/iio/frequency/admv1014.c | 2 +- drivers/iio/frequency/adrf6780.c | 2 +- drivers/iio/gyro/adis16080.c | 4 +- drivers/iio/gyro/adis16136.c | 8 +- drivers/iio/gyro/adis16260.c | 12 +- drivers/iio/gyro/adxrs450.c | 4 +- drivers/iio/gyro/bmg160_spi.c | 7 +- drivers/iio/gyro/fxas21002c_spi.c | 2 +- drivers/iio/gyro/st_gyro_spi.c | 18 +-- drivers/iio/health/afe4403.c | 2 +- drivers/iio/humidity/hts221_spi.c | 2 +- drivers/iio/imu/adis16400.c | 30 ++-- drivers/iio/imu/adis16460.c | 2 +- drivers/iio/imu/adis16475.c | 54 ++++---- drivers/iio/imu/adis16480.c | 40 +++--- drivers/iio/imu/adis16550.c | 9 +- drivers/iio/imu/bmi160/bmi160_spi.c | 4 +- drivers/iio/imu/bmi270/bmi270_spi.c | 4 +- drivers/iio/imu/bmi323/bmi323_spi.c | 2 +- drivers/iio/imu/fxos8700_spi.c | 2 +- .../iio/imu/inv_icm42600/inv_icm42600_spi.c | 14 +- .../iio/imu/inv_icm45600/inv_icm45600_spi.c | 16 +-- drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c | 34 ++--- drivers/iio/imu/smi240.c | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c | 48 +++---- drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c | 4 +- drivers/iio/light/st_uvis25_spi.c | 2 +- drivers/iio/magnetometer/bmc150_magn_spi.c | 6 +- drivers/iio/magnetometer/hmc5843_spi.c | 6 +- drivers/iio/magnetometer/mmc5983.c | 2 +- drivers/iio/magnetometer/st_magn_spi.c | 12 +- drivers/iio/potentiometer/max5481.c | 8 +- drivers/iio/potentiometer/max5487.c | 6 +- drivers/iio/potentiometer/mcp41010.c | 12 +- drivers/iio/potentiometer/mcp4131.c | 128 +++++++++--------- drivers/iio/potentiometer/x9250.c | 4 +- drivers/iio/pressure/abp2030pa_spi.c | 2 +- drivers/iio/pressure/bmp280-spi.c | 14 +- drivers/iio/pressure/hsc030pa_spi.c | 2 +- drivers/iio/pressure/mpl115_spi.c | 2 +- drivers/iio/pressure/mprls0025pa_spi.c | 2 +- drivers/iio/pressure/ms5611_spi.c | 4 +- drivers/iio/pressure/st_pressure_spi.c | 24 ++-- drivers/iio/pressure/zpa2326_spi.c | 2 +- drivers/iio/proximity/as3935.c | 2 +- drivers/iio/resolver/ad2s1200.c | 4 +- drivers/iio/resolver/ad2s1210.c | 2 +- drivers/iio/resolver/ad2s90.c | 2 +- drivers/iio/temperature/ltc2983.c | 10 +- drivers/iio/temperature/max31856.c | 2 +- drivers/iio/temperature/max31865.c | 2 +- drivers/iio/temperature/maxim_thermocouple.c | 18 +-- drivers/staging/iio/adc/ad7816.c | 6 +- drivers/staging/iio/addac/adt7316-spi.c | 13 +- drivers/staging/iio/frequency/ad9832.c | 4 +- drivers/staging/iio/frequency/ad9834.c | 8 +- 172 files changed, 886 insertions(+), 927 deletions(-)
base-commit: 3ce97bd3c4f18608335e709c24d6a40e7036cab8
Signature · 1 line
2.47.3
PATCH 1/13 iio: Initialize i2c_device_id arrays using member names (part 2)
This is a follow-up for commit f68afce8e8a7 ("iio: Initialize i2c_device_id arrays using member names"). This previous commit missed these two instances because these drivers didn't exist yet in the tree where I prepared the respective patch.
--- drivers/iio/adc/rtq6056.c | 4 ++-- drivers/iio/magnetometer/mmc5983.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/iio/adc/rtq6056.c +2 -2
@@ -872,8 +872,8 @@ static const struct richtek_dev_data rtq6059_devdata = { };static const struct i2c_device_id rtq6056_id[] = { - {"rtq6056" , (kernel_ulong_t)&rtq6056_devdata }, - {"rtq6059" , (kernel_ulong_t)&rtq6059_devdata }, + { .name ="rtq6056" , .driver_data = (kernel_ulong_t)&rtq6056_devdata }, + { .name ="rtq6059" , .driver_data = (kernel_ulong_t)&rtq6059_devdata }, { } };MODULE_DEVICE_TABLE (i2c, rtq6056_id);
drivers/iio/magnetometer/mmc5983.c +1 -1
@@ -328,7 +328,7 @@ static const struct of_device_id mmc5983_of_match[] = {MODULE_DEVICE_TABLE (of, mmc5983_of_match);static const struct i2c_device_id mmc5983_id[] = { - {"mmc5983" }, + { .name ="mmc5983" }, { } };MODULE_DEVICE_TABLE (i2c, mmc5983_id);
Signature · 1 line
2.47.3
PATCH 2/13 iio: adc: ti-tsc2046: Simplify device abstraction
In reply to Uwe Kleine-König (The Capable Hub)The driver was introduced in 2021 and since then only supports a single chip variant. Simplify the driver by hard-coding the device properties instead of using the id_table's abstraction for a single chip type.
--- drivers/iio/adc/ti-tsc2046.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/iio/adc/ti-tsc2046.c +3 -7
@@ -739,7 +739,7 @@ static void tsc2046_adc_parse_fwnode(struct tsc2046_adc_priv *priv)static int tsc2046_adc_probe (struct spi_device *spi) { -const struct tsc2046_adc_dcfg *dcfg; +const struct tsc2046_adc_dcfg *dcfg = &tsc2046_adc_dcfg_tsc2046e;struct device *dev = &spi->dev;struct tsc2046_adc_priv *priv;struct iio_dev *indio_dev;
@@ -752,10 +752,6 @@ static int tsc2046_adc_probe(struct spi_device *spi)return -EINVAL ; } - dcfg =spi_get_device_match_data (spi); -if (!dcfg) -return -EINVAL ; - spi->mode &= ~SPI_MODE_X_MASK ; spi->mode |=SPI_MODE_0 ; ret =spi_setup (spi);
@@ -829,13 +825,13 @@ static int tsc2046_adc_probe(struct spi_device *spi) }static const struct of_device_id ads7950_of_table[] = { - { .compatible ="ti,tsc2046e-adc" , .data = &tsc2046_adc_dcfg_tsc2046e }, + { .compatible ="ti,tsc2046e-adc" }, { } };MODULE_DEVICE_TABLE (of, ads7950_of_table);static const struct spi_device_id tsc2046_adc_spi_ids[] = { - {"tsc2046e-adc" , (unsigned long )&tsc2046_adc_dcfg_tsc2046e }, + { .name ="tsc2046e-adc" }, { } };MODULE_DEVICE_TABLE (spi, tsc2046_adc_spi_ids);
Signature · 1 line
2.47.3
PATCH 3/13 iio: adc: ti-tsc2046: Drop unused member from private data
In reply to Uwe Kleine-König (The Capable Hub).dcfg is a write only field and thus it can be dropped.
--- drivers/iio/adc/ti-tsc2046.c | 2 -- 1 file changed, 2 deletions(-)
drivers/iio/adc/ti-tsc2046.c +0 -2
@@ -141,7 +141,6 @@ enum tsc2046_state {struct tsc2046_adc_priv {struct spi_device *spi; -const struct tsc2046_adc_dcfg *dcfg;bool internal_vref;struct iio_trigger *trig;
@@ -763,7 +762,6 @@ static int tsc2046_adc_probe(struct spi_device *spi)return -ENOMEM ; priv =iio_priv (indio_dev); - priv->dcfg = dcfg; priv->spi = spi;
Signature · 1 line
2.47.3
PATCH 4/13 iio: adc: max1241: Simplify device abstraction
In reply to Uwe Kleine-König (The Capable Hub)The driver was introduced in 2020 and since then only supports a single chip variant and .driver_data was unused from the start.
Drop the assignment for .driver_data and hardcode the device name instead of doing a lookup in a table with only one entry. While touching that array, make use of a named initializer.
--- drivers/iio/adc/max1241.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/iio/adc/max1241.c +2 -6
@@ -15,10 +15,6 @@#define MAX1241_VAL_MASK GENMASK(11, 0)#define MAX1241_SHUTDOWN_DELAY_USEC 4 -enum max1241_id { - max1241, -}; -struct max1241 {struct spi_device *spi;struct mutex lock;
@@ -166,7 +162,7 @@ static int max1241_probe(struct spi_device *spi)else dev_dbg (dev,"no shutdown pin passed, low-power mode disabled" ); - indio_dev->name =spi_get_device_id (spi)->name; + indio_dev->name ="max1241" ; indio_dev->info = &max1241_info; indio_dev->modes =INDIO_DIRECT_MODE ; indio_dev->channels = max1241_channels;
@@ -176,7 +172,7 @@ static int max1241_probe(struct spi_device *spi) }static const struct spi_device_id max1241_id[] = { - {"max1241" , max1241 }, + { .name ="max1241" }, { } };
Signature · 1 line
2.47.3
PATCH 5/13 iio: dac: max5522: Simplify device abstraction
In reply to Uwe Kleine-König (The Capable Hub)The driver only supports a single chip variant since it's birth in 2022. Both the spi id_table and the of id_table are essentially unused (only assigned to a write-only member in private data).
Hardcode the device name and then drop various unused stuff from the driver. While touching the spi id_table assign .name using a named initializer.
--- drivers/iio/dac/max5522.c | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-)
drivers/iio/dac/max5522.c +3 -28
@@ -25,15 +25,8 @@#define MAX5522_REG_DATA (x) ((x) + MAX5522_CTRL_LOAD_IN_A) -struct max5522_chip_info { -const char *name; -const struct iio_chan_spec *channels; -unsigned int num_channels; -}; -struct max5522_state {struct regmap *regmap; -const struct max5522_chip_info *chip_info;unsigned short dac_cache[2 ];int vref_mV; };
@@ -58,18 +51,6 @@ static const struct iio_chan_spec max5522_channels[] = { MAX5522_CHANNEL(1), }; -enum max5522_type { -ID_MAX5522 , -}; - -static const struct max5522_chip_info max5522_chip_info_tbl[] = { - [ID_MAX5522 ] = { - .name ="max5522" , - .channels = max5522_channels, - .num_channels =2 , - }, -}; -static inline int max5522_info_to_reg (struct iio_chan_spec const *chan) {return MAX5522_REG_DATA (chan->channel);
@@ -140,9 +121,6 @@ static int max5522_spi_probe(struct spi_device *spi) } state =iio_priv (indio_dev); - state->chip_info =spi_get_device_match_data (spi); -if (!state->chip_info) -return -EINVAL ; ret =devm_regulator_get_enable_read_voltage (&spi->dev,"vrefin" );if (ret <0 )
@@ -159,22 +137,19 @@ static int max5522_spi_probe(struct spi_device *spi) indio_dev->modes =INDIO_DIRECT_MODE ; indio_dev->channels = max5522_channels; indio_dev->num_channels =ARRAY_SIZE (max5522_channels); - indio_dev->name = max5522_chip_info_tbl[ID_MAX5522 ].name; + indio_dev->name ="max5522" ;return devm_iio_device_register (&spi->dev, indio_dev); }static const struct spi_device_id max5522_ids[] = { - {"max5522" , (kernel_ulong_t)&max5522_chip_info_tbl[ID_MAX5522 ] }, + { .name ="max5522" }, { } };MODULE_DEVICE_TABLE (spi, max5522_ids);static const struct of_device_id max5522_of_match[] = { - { - .compatible ="maxim,max5522" , - .data = &max5522_chip_info_tbl[ID_MAX5522 ], - }, + { .compatible ="maxim,max5522" }, { } };MODULE_DEVICE_TABLE (of, max5522_of_match);
Signature · 1 line
2.47.3
PATCH 6/13 iio: frequency: ad9523: Simplify driver a bit
In reply to Uwe Kleine-König (The Capable Hub)spi driver data is only set but never used, so the assignment can be dropped. Also the spi id_table's .driver_data is unused and can be dropped.
While touching the spi id_table modify it to use a named initializer.
--- drivers/iio/frequency/ad9523.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/iio/frequency/ad9523.c +1 -2
@@ -990,7 +990,6 @@ static int ad9523_probe(struct spi_device *spi)if (IS_ERR (st->sync_gpio))return PTR_ERR (st->sync_gpio); -spi_set_drvdata (spi, indio_dev); st->spi = spi; st->pdata = pdata;
@@ -1009,7 +1008,7 @@ static int ad9523_probe(struct spi_device *spi) }static const struct spi_device_id ad9523_id[] = { - {"ad9523-1" ,9523 }, + { .name ="ad9523-1" }, { } };MODULE_DEVICE_TABLE (spi, ad9523_id);
Signature · 1 line
2.47.3
PATCH 7/13 iio: imu: adis16550: Simplify device abstraction
In reply to Uwe Kleine-König (The Capable Hub)The driver supports a single chip variant only. Simplify the driver by hard-coding the device properties instead of using the id_table's abstraction for a single chip type and a lookup in a table with only one entry.
--- drivers/iio/imu/adis16550.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/iio/imu/adis16550.c +4 -5
@@ -1064,9 +1064,8 @@ static int adis16550_probe(struct spi_device *spi)return -ENOMEM ; st =iio_priv (indio_dev); - st->info =spi_get_device_match_data (spi); -if (!st->info) -return -EINVAL ; + st->info = &adis16550_chip_info; + adis = &st->adis; indio_dev->name = st->info->name; indio_dev->channels = st->info->channels;
@@ -1117,13 +1116,13 @@ static int adis16550_probe(struct spi_device *spi) }static const struct spi_device_id adis16550_id[] = { - {"adis16550" , (kernel_ulong_t)&adis16550_chip_info}, + { .name ="adis16550" }, { } };MODULE_DEVICE_TABLE (spi, adis16550_id);static const struct of_device_id adis16550_of_match[] = { - { .compatible ="adi,adis16550" , .data = &adis16550_chip_info }, + { .compatible ="adi,adis16550" }, { } };MODULE_DEVICE_TABLE (of, adis16550_of_match);
Signature · 1 line
2.47.3
PATCH 8/13 iio: magnetometer: hmc5843: Simplify device abstraction
In reply to Uwe Kleine-König (The Capable Hub)The driver supports a single chip variant only. Simplify the driver by hard-coding the device properties instead of using the id_table's abstraction for a single chip type and a lookup in a table with only one entry.
--- drivers/iio/magnetometer/hmc5843_spi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/iio/magnetometer/hmc5843_spi.c +2 -4
@@ -56,7 +56,6 @@ static int hmc5843_spi_probe(struct spi_device *spi) {int ret;struct regmap *regmap; -const struct spi_device_id *id =spi_get_device_id (spi); spi->mode =SPI_MODE_3 ; spi->max_speed_hz =8000000 ;
@@ -69,8 +68,7 @@ static int hmc5843_spi_probe(struct spi_device *spi)return PTR_ERR (regmap);return hmc5843_common_probe (&spi->dev, - regmap, - id->driver_data, id->name); + regmap,HMC5983_ID ,"hmc5983" ); }static void hmc5843_spi_remove (struct spi_device *spi)
@@ -79,7 +77,7 @@ static void hmc5843_spi_remove(struct spi_device *spi) }static const struct spi_device_id hmc5843_id[] = { - {"hmc5983" ,HMC5983_ID }, + { .name ="hmc5983" }, { } };MODULE_DEVICE_TABLE (spi, hmc5843_id);
Signature · 1 line
2.47.3
PATCH 9/13 iio: accel: bmc150: Explicitly set spi .driver_data
In reply to Uwe Kleine-König (The Capable Hub)There is one id entry that has an explicit assignment to .driver_data. To make the intention clearer, assign BOSCH_UNKNOWN (which is also 0) for all previously ids that had .driver_data = 0 implicitly before.
While touching all entries in this array, convert to named initializers.
This change is similar to commit e50856dc41e8 ("iio: accel: bmc150:
Explicitly set .driver_data") but cares for the driver's spi part instead of i2c.
--- drivers/iio/accel/bmc150-accel-spi.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
drivers/iio/accel/bmc150-accel-spi.c +9 -9
@@ -53,15 +53,15 @@ static const struct acpi_device_id bmc150_accel_acpi_match[] = {MODULE_DEVICE_TABLE (acpi, bmc150_accel_acpi_match);static const struct spi_device_id bmc150_accel_id[] = { - {"bma222" }, - {"bma222e" }, - {"bma250e" }, - {"bma253" }, - {"bma255" }, - {"bma280" }, - {"bmc150_accel" }, - {"bmc156_accel" ,BOSCH_BMC156 }, - {"bmi055_accel" }, + { .name ="bma222" , .driver_data =BOSCH_UNKNOWN }, + { .name ="bma222e" , .driver_data =BOSCH_UNKNOWN }, + { .name ="bma250e" , .driver_data =BOSCH_UNKNOWN }, + { .name ="bma253" , .driver_data =BOSCH_UNKNOWN }, + { .name ="bma255" , .driver_data =BOSCH_UNKNOWN }, + { .name ="bma280" , .driver_data =BOSCH_UNKNOWN }, + { .name ="bmc150_accel" , .driver_data =BOSCH_UNKNOWN }, + { .name ="bmc156_accel" , .driver_data =BOSCH_BMC156 }, + { .name ="bmi055_accel" , .driver_data =BOSCH_UNKNOWN }, { } };MODULE_DEVICE_TABLE (spi, bmc150_accel_id);
Signature · 1 line
2.47.3
PATCH 10/13 iio: Drop unused assignment of spi_device_id driver data
In reply to Uwe Kleine-König (The Capable Hub)The drivers explicitly set the .driver_data member of struct spi_device_id to zero without relying on that value. Drop these unused assignments.
While touching these arrays unify spacing and use named initializers for .name.
This patch doesn't modify the compiled arrays, only their representation in source form benefits. The former was confirmed with x86 and arm64 builds.
--- drivers/iio/accel/adxl367_spi.c | 2 +- drivers/iio/accel/bma220_spi.c | 2 +- drivers/iio/accel/bma400_spi.c | 2 +- drivers/iio/accel/kxsd9-spi.c | 2 +- drivers/iio/accel/mma7455_spi.c | 4 ++-- drivers/iio/adc/ad7266.c | 4 ++-- drivers/iio/adc/ad7280a.c | 2 +- drivers/iio/adc/ad7292.c | 2 +- drivers/iio/adc/ad7298.c | 2 +- drivers/iio/adc/ade9000.c | 2 +- drivers/iio/adc/hi8435.c | 2 +- drivers/iio/adc/ti-adc084s021.c | 2 +- drivers/iio/adc/ti-adc108s102.c | 2 +- drivers/iio/amplifiers/ada4250.c | 2 +- drivers/iio/chemical/bme680_spi.c | 2 +- drivers/iio/dac/ad5758.c | 2 +- drivers/iio/dac/ad5770r.c | 2 +- drivers/iio/dac/ad7293.c | 2 +- drivers/iio/dac/ad7303.c | 2 +- drivers/iio/filter/admv8818.c | 2 +- drivers/iio/frequency/admv1013.c | 2 +- drivers/iio/frequency/admv1014.c | 2 +- drivers/iio/frequency/adrf6780.c | 2 +- drivers/iio/gyro/bmg160_spi.c | 7 +++---- drivers/iio/gyro/fxas21002c_spi.c | 2 +- drivers/iio/health/afe4403.c | 2 +- drivers/iio/imu/adis16460.c | 2 +- drivers/iio/imu/bmi160/bmi160_spi.c | 4 ++-- drivers/iio/imu/fxos8700_spi.c | 2 +- drivers/iio/magnetometer/bmc150_magn_spi.c | 6 +++--- drivers/iio/pressure/mpl115_spi.c | 2 +- drivers/iio/pressure/zpa2326_spi.c | 2 +- drivers/iio/proximity/as3935.c | 2 +- drivers/iio/temperature/max31856.c | 2 +- drivers/iio/temperature/max31865.c | 2 +- 35 files changed, 42 insertions(+), 43 deletions(-)
drivers/iio/accel/adxl367_spi.c +1 -1
@@ -138,7 +138,7 @@ static int adxl367_spi_probe(struct spi_device *spi) }static const struct spi_device_id adxl367_spi_id[] = { - {"adxl367" ,0 }, + { .name ="adxl367" }, { } };MODULE_DEVICE_TABLE (spi, adxl367_spi_id);
drivers/iio/accel/bma220_spi.c +1 -1
@@ -26,7 +26,7 @@ static int bma220_spi_probe(struct spi_device *spi) }static const struct spi_device_id bma220_spi_id[] = { - {"bma220" ,0 }, + { .name ="bma220" }, { } };
drivers/iio/accel/bma400_spi.c +1 -1
@@ -88,7 +88,7 @@ static int bma400_spi_probe(struct spi_device *spi) }static const struct spi_device_id bma400_spi_ids[] = { - {"bma400" ,0 }, + { .name ="bma400" }, { } };MODULE_DEVICE_TABLE (spi, bma400_spi_ids);
drivers/iio/accel/kxsd9-spi.c +1 -1
@@ -37,7 +37,7 @@ static void kxsd9_spi_remove(struct spi_device *spi) }static const struct spi_device_id kxsd9_spi_id[] = { - {"kxsd9" ,0 }, + { .name ="kxsd9" }, { } };MODULE_DEVICE_TABLE (spi, kxsd9_spi_id);
drivers/iio/accel/mma7455_spi.c +2 -2
@@ -28,8 +28,8 @@ static void mma7455_spi_remove(struct spi_device *spi) }static const struct spi_device_id mma7455_spi_ids[] = { - {"mma7455" ,0 }, - {"mma7456" ,0 }, + { .name ="mma7455" }, + { .name ="mma7456" }, { } };MODULE_DEVICE_TABLE (spi, mma7455_spi_ids);
drivers/iio/adc/ad7266.c +2 -2
@@ -453,8 +453,8 @@ static int ad7266_probe(struct spi_device *spi) }static const struct spi_device_id ad7266_id[] = { - {"ad7265" ,0 }, - {"ad7266" ,0 }, + { .name ="ad7265" }, + { .name ="ad7266" }, { } };MODULE_DEVICE_TABLE (spi, ad7266_id);
drivers/iio/adc/ad7280a.c +1 -1
@@ -1083,7 +1083,7 @@ static int ad7280_probe(struct spi_device *spi) }static const struct spi_device_id ad7280_id[] = { - {"ad7280a" ,0 }, + { .name ="ad7280a" }, { } };MODULE_DEVICE_TABLE (spi, ad7280_id);
drivers/iio/adc/ad7292.c +1 -1
@@ -300,7 +300,7 @@ static int ad7292_probe(struct spi_device *spi) }static const struct spi_device_id ad7292_id_table[] = { - {"ad7292" ,0 }, + { .name ="ad7292" }, { } };MODULE_DEVICE_TABLE (spi, ad7292_id_table);
drivers/iio/adc/ad7298.c +1 -1
@@ -354,7 +354,7 @@ static const struct acpi_device_id ad7298_acpi_ids[] = {MODULE_DEVICE_TABLE (acpi, ad7298_acpi_ids);static const struct spi_device_id ad7298_id[] = { - {"ad7298" ,0 }, + { .name ="ad7298" }, { } };MODULE_DEVICE_TABLE (spi, ad7298_id);
drivers/iio/adc/ade9000.c +1 -1
@@ -1768,7 +1768,7 @@ static int ade9000_probe(struct spi_device *spi) };static const struct spi_device_id ade9000_id[] = { - {"ade9000" ,0 }, + { .name ="ade9000" }, { } };MODULE_DEVICE_TABLE (spi, ade9000_id);
drivers/iio/adc/hi8435.c +1 -1
@@ -527,7 +527,7 @@ static const struct of_device_id hi8435_dt_ids[] = {MODULE_DEVICE_TABLE (of, hi8435_dt_ids);static const struct spi_device_id hi8435_id[] = { - {"hi8435" ,0 }, + { .name ="hi8435" }, { } };MODULE_DEVICE_TABLE (spi, hi8435_id);
drivers/iio/adc/ti-adc084s021.c +1 -1
@@ -244,7 +244,7 @@ static const struct of_device_id adc084s021_of_match[] = {MODULE_DEVICE_TABLE (of, adc084s021_of_match);static const struct spi_device_id adc084s021_id[] = { - {ADC084S021_DRIVER_NAME ,0 }, + { .name =ADC084S021_DRIVER_NAME }, { } };MODULE_DEVICE_TABLE (spi, adc084s021_id);
drivers/iio/adc/ti-adc108s102.c +1 -1
@@ -277,7 +277,7 @@ static const struct acpi_device_id adc108s102_acpi_ids[] = {MODULE_DEVICE_TABLE (acpi, adc108s102_acpi_ids);static const struct spi_device_id adc108s102_id[] = { - {"adc108s102" ,0 }, + { .name ="adc108s102" }, { } };MODULE_DEVICE_TABLE (spi, adc108s102_id);
drivers/iio/amplifiers/ada4250.c +1 -1
@@ -358,7 +358,7 @@ static int ada4250_probe(struct spi_device *spi) }static const struct spi_device_id ada4250_id[] = { - {"ada4250" ,0 }, + { .name ="ada4250" }, { } };MODULE_DEVICE_TABLE (spi, ada4250_id);
drivers/iio/chemical/bme680_spi.c +1 -1
@@ -131,7 +131,7 @@ static int bme680_spi_probe(struct spi_device *spi) }static const struct spi_device_id bme680_spi_id[] = { - {"bme680" ,0 }, + { .name ="bme680" }, { } };MODULE_DEVICE_TABLE (spi, bme680_spi_id);
drivers/iio/dac/ad5758.c +1 -1
@@ -879,7 +879,7 @@ static int ad5758_probe(struct spi_device *spi) }static const struct spi_device_id ad5758_id[] = { - {"ad5758" ,0 }, + { .name ="ad5758" }, { } };MODULE_DEVICE_TABLE (spi, ad5758_id);
drivers/iio/dac/ad5770r.c +1 -1
@@ -642,7 +642,7 @@ static const struct of_device_id ad5770r_of_id[] = {MODULE_DEVICE_TABLE (of, ad5770r_of_id);static const struct spi_device_id ad5770r_id[] = { - {"ad5770r" ,0 }, + { .name ="ad5770r" }, { } };MODULE_DEVICE_TABLE (spi, ad5770r_id);
drivers/iio/dac/ad7293.c +1 -1
@@ -870,7 +870,7 @@ static int ad7293_probe(struct spi_device *spi) }static const struct spi_device_id ad7293_id[] = { - {"ad7293" ,0 }, + { .name ="ad7293" }, { } };MODULE_DEVICE_TABLE (spi, ad7293_id);
drivers/iio/dac/ad7303.c +1 -1
@@ -271,7 +271,7 @@ static const struct of_device_id ad7303_spi_of_match[] = {MODULE_DEVICE_TABLE (of, ad7303_spi_of_match);static const struct spi_device_id ad7303_spi_ids[] = { - {"ad7303" ,0 }, + { .name ="ad7303" }, { } };MODULE_DEVICE_TABLE (spi, ad7303_spi_ids);
drivers/iio/filter/admv8818.c +1 -1
@@ -790,7 +790,7 @@ static int admv8818_probe(struct spi_device *spi) }static const struct spi_device_id admv8818_id[] = { - {"admv8818" ,0 }, + { .name ="admv8818" }, { } };MODULE_DEVICE_TABLE (spi, admv8818_id);
drivers/iio/frequency/admv1013.c +1 -1
@@ -620,7 +620,7 @@ static int admv1013_probe(struct spi_device *spi) }static const struct spi_device_id admv1013_id[] = { - {"admv1013" ,0 }, + { .name ="admv1013" }, { } };MODULE_DEVICE_TABLE (spi, admv1013_id);
drivers/iio/frequency/admv1014.c +1 -1
@@ -782,7 +782,7 @@ static int admv1014_probe(struct spi_device *spi) }static const struct spi_device_id admv1014_id[] = { - {"admv1014" ,0 }, + { .name ="admv1014" }, { } };MODULE_DEVICE_TABLE (spi, admv1014_id);
drivers/iio/frequency/adrf6780.c +1 -1
@@ -487,7 +487,7 @@ static int adrf6780_probe(struct spi_device *spi) }static const struct spi_device_id adrf6780_id[] = { - {"adrf6780" ,0 }, + { .name ="adrf6780" }, { } };MODULE_DEVICE_TABLE (spi, adrf6780_id);
drivers/iio/gyro/bmg160_spi.c +3 -4
@@ -33,12 +33,11 @@ static void bmg160_spi_remove(struct spi_device *spi) }static const struct spi_device_id bmg160_spi_id[] = { - {"bmg160" ,0 }, - {"bmi055_gyro" ,0 }, - {"bmi088_gyro" ,0 }, + { .name ="bmg160" }, + { .name ="bmi055_gyro" }, + { .name ="bmi088_gyro" }, { } }; -MODULE_DEVICE_TABLE (spi, bmg160_spi_id);static const struct of_device_id bmg160_of_match[] = {
drivers/iio/gyro/fxas21002c_spi.c +1 -1
@@ -40,7 +40,7 @@ static void fxas21002c_spi_remove(struct spi_device *spi) }static const struct spi_device_id fxas21002c_spi_id[] = { - {"fxas21002c" ,0 }, + { .name ="fxas21002c" }, { } };MODULE_DEVICE_TABLE (spi, fxas21002c_spi_id);
drivers/iio/health/afe4403.c +1 -1
@@ -568,7 +568,7 @@ static int afe4403_probe(struct spi_device *spi) }static const struct spi_device_id afe4403_ids[] = { - {"afe4403" ,0 }, + { .name ="afe4403" }, { } };MODULE_DEVICE_TABLE (spi, afe4403_ids);
drivers/iio/imu/adis16460.c +1 -1
@@ -394,7 +394,7 @@ static int adis16460_probe(struct spi_device *spi) }static const struct spi_device_id adis16460_ids[] = { - {"adis16460" ,0 }, + { .name ="adis16460" }, { } };MODULE_DEVICE_TABLE (spi, adis16460_ids);
drivers/iio/imu/bmi160/bmi160_spi.c +2 -2
@@ -35,8 +35,8 @@ static int bmi160_spi_probe(struct spi_device *spi) }static const struct spi_device_id bmi160_spi_id[] = { - {"bmi120" ,0 }, - {"bmi160" ,0 }, + { .name ="bmi120" }, + { .name ="bmi160" }, { } };MODULE_DEVICE_TABLE (spi, bmi160_spi_id);
drivers/iio/imu/fxos8700_spi.c +1 -1
@@ -24,7 +24,7 @@ static int fxos8700_spi_probe(struct spi_device *spi) }static const struct spi_device_id fxos8700_spi_id[] = { - {"fxos8700" ,0 }, + { .name ="fxos8700" }, { } };MODULE_DEVICE_TABLE (spi, fxos8700_spi_id);
drivers/iio/magnetometer/bmc150_magn_spi.c +3 -3
@@ -34,9 +34,9 @@ static void bmc150_magn_spi_remove(struct spi_device *spi) }static const struct spi_device_id bmc150_magn_spi_id[] = { - {"bmc150_magn" ,0 }, - {"bmc156_magn" ,0 }, - {"bmm150_magn" ,0 }, + { .name ="bmc150_magn" }, + { .name ="bmc156_magn" }, + { .name ="bmm150_magn" }, { } };MODULE_DEVICE_TABLE (spi, bmc150_magn_spi_id);
drivers/iio/pressure/mpl115_spi.c +1 -1
@@ -84,7 +84,7 @@ static int mpl115_spi_probe(struct spi_device *spi) }static const struct spi_device_id mpl115_spi_ids[] = { - {"mpl115" ,0 }, + { .name ="mpl115" }, { } };MODULE_DEVICE_TABLE (spi, mpl115_spi_ids);
drivers/iio/pressure/zpa2326_spi.c +1 -1
@@ -61,7 +61,7 @@ static void zpa2326_remove_spi(struct spi_device *spi) }static const struct spi_device_id zpa2326_spi_ids[] = { - {"zpa2326" ,0 }, + { .name ="zpa2326" }, { } };MODULE_DEVICE_TABLE (spi, zpa2326_spi_ids);
drivers/iio/proximity/as3935.c +1 -1
@@ -449,7 +449,7 @@ static const struct of_device_id as3935_of_match[] = {MODULE_DEVICE_TABLE (of, as3935_of_match);static const struct spi_device_id as3935_id[] = { - {"as3935" ,0 }, + { .name ="as3935" }, { } };MODULE_DEVICE_TABLE (spi, as3935_id);
drivers/iio/temperature/max31856.c +1 -1
@@ -462,7 +462,7 @@ static int max31856_probe(struct spi_device *spi) }static const struct spi_device_id max31856_id[] = { - {"max31856" ,0 }, + { .name ="max31856" }, { } };MODULE_DEVICE_TABLE (spi, max31856_id);
drivers/iio/temperature/max31865.c +1 -1
@@ -325,7 +325,7 @@ static int max31865_probe(struct spi_device *spi) }static const struct spi_device_id max31865_id[] = { - {"max31865" ,0 }, + { .name ="max31865" }, { } };MODULE_DEVICE_TABLE (spi, max31865_id);
Signature · 1 line
2.47.3
PATCH 11/13 iio: Initialize spi_device_id arrays using member names
In reply to Uwe Kleine-König (The Capable Hub)While being less compact, using named initializers allows to more easily see which members of the structs are assigned which value without having to lookup the declaration of the struct. And it's also more robust against changes to the struct definition.
The mentioned robustness is relevant for a planned change to struct spi_device_id that replaces .driver_data by an anonymous union.
This patch doesn't modify the compiled arrays, only their representation in source form benefits. The former was confirmed with x86 and arm64 builds.
--- drivers/iio/accel/adxl345_spi.c | 4 +- drivers/iio/accel/adxl355_spi.c | 4 +- drivers/iio/accel/adxl372_spi.c | 4 +- drivers/iio/accel/adxl380_spi.c | 8 +- drivers/iio/accel/bmi088-accel-spi.c | 6 +- drivers/iio/accel/fxls8962af-spi.c | 4 +- drivers/iio/accel/sca3000.c | 8 +- drivers/iio/accel/sca3300.c | 4 +- drivers/iio/accel/st_accel_spi.c | 40 +++--- drivers/iio/adc/ad4000.c | 62 ++++----- drivers/iio/adc/ad4030.c | 14 +- drivers/iio/adc/ad4080.c | 22 +-- drivers/iio/adc/ad4130.c | 12 +- drivers/iio/adc/ad4134.c | 2 +- drivers/iio/adc/ad4170-4.c | 6 +- drivers/iio/adc/ad4851.c | 18 +-- drivers/iio/adc/ad7091r8.c | 6 +- drivers/iio/adc/ad7124.c | 4 +- drivers/iio/adc/ad7173.c | 26 ++-- drivers/iio/adc/ad7191.c | 2 +- drivers/iio/adc/ad7192.c | 10 +- drivers/iio/adc/ad7380.c | 36 ++--- drivers/iio/adc/ad7476.c | 60 ++++---- drivers/iio/adc/ad7606_spi.c | 22 +-- drivers/iio/adc/ad7766.c | 12 +- drivers/iio/adc/ad7768-1.c | 8 +- drivers/iio/adc/ad7780.c | 8 +- drivers/iio/adc/ad7791.c | 10 +- drivers/iio/adc/ad7793.c | 18 +-- drivers/iio/adc/ad7887.c | 2 +- drivers/iio/adc/ad7923.c | 14 +- drivers/iio/adc/ad7944.c | 6 +- drivers/iio/adc/ad7949.c | 6 +- drivers/iio/adc/ad9467.c | 14 +- drivers/iio/adc/max1027.c | 12 +- drivers/iio/adc/max1118.c | 6 +- drivers/iio/adc/max11205.c | 4 +- drivers/iio/adc/max11410.c | 2 +- drivers/iio/adc/max14001.c | 4 +- drivers/iio/adc/mcp320x.c | 26 ++-- drivers/iio/adc/mcp3564.c | 24 ++-- drivers/iio/adc/mcp3911.c | 14 +- drivers/iio/adc/rohm-bd79112.c | 2 +- drivers/iio/adc/ti-adc0832.c | 8 +- drivers/iio/adc/ti-adc12138.c | 6 +- drivers/iio/adc/ti-adc128s052.c | 24 ++-- drivers/iio/adc/ti-adc161s626.c | 4 +- drivers/iio/adc/ti-ads1018.c | 4 +- drivers/iio/adc/ti-ads124s08.c | 4 +- drivers/iio/adc/ti-ads1298.c | 2 +- drivers/iio/adc/ti-ads131e08.c | 6 +- drivers/iio/adc/ti-ads131m02.c | 10 +- drivers/iio/adc/ti-ads7950.c | 24 ++-- drivers/iio/adc/ti-ads8688.c | 4 +- drivers/iio/adc/ti-lmp92064.c | 2 +- drivers/iio/adc/ti-tlc4541.c | 4 +- drivers/iio/addac/ad74115.c | 2 +- drivers/iio/amplifiers/ad8366.c | 26 ++-- drivers/iio/chemical/ens160_spi.c | 2 +- drivers/iio/dac/ad3530r.c | 8 +- drivers/iio/dac/ad5064.c | 32 ++--- drivers/iio/dac/ad5360.c | 16 +-- drivers/iio/dac/ad5380.c | 32 ++--- drivers/iio/dac/ad5446-spi.c | 62 ++++----- drivers/iio/dac/ad5449.c | 14 +- drivers/iio/dac/ad5504.c | 4 +- drivers/iio/dac/ad5624r_spi.c | 12 +- drivers/iio/dac/ad5706r.c | 2 +- drivers/iio/dac/ad5755.c | 10 +- drivers/iio/dac/ad5761.c | 8 +- drivers/iio/dac/ad5764.c | 8 +- drivers/iio/dac/ad5766.c | 4 +- drivers/iio/dac/ad5791.c | 10 +- drivers/iio/dac/ad8801.c | 4 +- drivers/iio/dac/ad9739a.c | 2 +- drivers/iio/dac/ltc1660.c | 4 +- drivers/iio/dac/ltc2632.c | 44 +++--- drivers/iio/dac/ltc2664.c | 4 +- drivers/iio/dac/ltc2688.c | 2 +- drivers/iio/dac/max22007.c | 2 +- drivers/iio/dac/mcp4821.c | 12 +- drivers/iio/dac/mcp4922.c | 8 +- drivers/iio/dac/rohm-bd79703.c | 8 +- drivers/iio/dac/ti-dac082s085.c | 12 +- drivers/iio/dac/ti-dac7311.c | 6 +- drivers/iio/dac/ti-dac7612.c | 2 +- drivers/iio/frequency/adf4350.c | 4 +- drivers/iio/frequency/adf4371.c | 4 +- drivers/iio/frequency/adf4377.c | 4 +- drivers/iio/gyro/adis16080.c | 4 +- drivers/iio/gyro/adis16136.c | 8 +- drivers/iio/gyro/adis16260.c | 12 +- drivers/iio/gyro/adxrs450.c | 4 +- drivers/iio/gyro/st_gyro_spi.c | 18 +-- drivers/iio/humidity/hts221_spi.c | 2 +- drivers/iio/imu/adis16400.c | 30 ++-- drivers/iio/imu/adis16475.c | 54 ++++---- drivers/iio/imu/adis16480.c | 40 +++--- drivers/iio/imu/bmi270/bmi270_spi.c | 4 +- drivers/iio/imu/bmi323/bmi323_spi.c | 2 +- .../iio/imu/inv_icm42600/inv_icm42600_spi.c | 14 +- .../iio/imu/inv_icm45600/inv_icm45600_spi.c | 16 +-- drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c | 34 ++--- drivers/iio/imu/smi240.c | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c | 48 +++---- drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c | 4 +- drivers/iio/light/st_uvis25_spi.c | 2 +- drivers/iio/magnetometer/st_magn_spi.c | 12 +- drivers/iio/potentiometer/max5481.c | 8 +- drivers/iio/potentiometer/max5487.c | 6 +- drivers/iio/potentiometer/mcp41010.c | 12 +- drivers/iio/potentiometer/mcp4131.c | 128 +++++++++--------- drivers/iio/potentiometer/x9250.c | 4 +- drivers/iio/pressure/abp2030pa_spi.c | 2 +- drivers/iio/pressure/bmp280-spi.c | 14 +- drivers/iio/pressure/hsc030pa_spi.c | 2 +- drivers/iio/pressure/mprls0025pa_spi.c | 2 +- drivers/iio/pressure/ms5611_spi.c | 4 +- drivers/iio/pressure/st_pressure_spi.c | 24 ++-- drivers/iio/resolver/ad2s1200.c | 4 +- drivers/iio/resolver/ad2s1210.c | 2 +- drivers/iio/resolver/ad2s90.c | 2 +- drivers/iio/temperature/ltc2983.c | 10 +- drivers/iio/temperature/maxim_thermocouple.c | 18 +-- 124 files changed, 802 insertions(+), 802 deletions(-)
drivers/iio/accel/adxl345_spi.c +2 -2
@@ -60,8 +60,8 @@ static const struct adxl345_chip_info adxl375_spi_info = { };static const struct spi_device_id adxl345_spi_id[] = { - {"adxl345" , (kernel_ulong_t)&adxl345_spi_info }, - {"adxl375" , (kernel_ulong_t)&adxl375_spi_info }, + { .name ="adxl345" , .driver_data = (kernel_ulong_t)&adxl345_spi_info }, + { .name ="adxl375" , .driver_data = (kernel_ulong_t)&adxl375_spi_info }, { } };MODULE_DEVICE_TABLE (spi, adxl345_spi_id);
drivers/iio/accel/adxl355_spi.c +2 -2
@@ -41,8 +41,8 @@ static int adxl355_spi_probe(struct spi_device *spi) }static const struct spi_device_id adxl355_spi_id[] = { - {"adxl355" , (kernel_ulong_t)&adxl35x_chip_info[ADXL355 ] }, - {"adxl359" , (kernel_ulong_t)&adxl35x_chip_info[ADXL359 ] }, + { .name ="adxl355" , .driver_data = (kernel_ulong_t)&adxl35x_chip_info[ADXL355 ] }, + { .name ="adxl359" , .driver_data = (kernel_ulong_t)&adxl35x_chip_info[ADXL359 ] }, { } };MODULE_DEVICE_TABLE (spi, adxl355_spi_id);
drivers/iio/accel/adxl372_spi.c +2 -2
@@ -35,8 +35,8 @@ static int adxl372_spi_probe(struct spi_device *spi) }static const struct spi_device_id adxl372_spi_id[] = { - {"adxl371" , (kernel_ulong_t)&adxl371_chip_info }, - {"adxl372" , (kernel_ulong_t)&adxl372_chip_info }, + { .name ="adxl371" , .driver_data = (kernel_ulong_t)&adxl371_chip_info }, + { .name ="adxl372" , .driver_data = (kernel_ulong_t)&adxl372_chip_info }, { } };MODULE_DEVICE_TABLE (spi, adxl372_spi_id);
drivers/iio/accel/adxl380_spi.c +4 -4
@@ -35,10 +35,10 @@ static int adxl380_spi_probe(struct spi_device *spi) }static const struct spi_device_id adxl380_spi_id[] = { - {"adxl318" , (kernel_ulong_t)&adxl318_chip_info }, - {"adxl319" , (kernel_ulong_t)&adxl319_chip_info }, - {"adxl380" , (kernel_ulong_t)&adxl380_chip_info }, - {"adxl382" , (kernel_ulong_t)&adxl382_chip_info }, + { .name ="adxl318" , .driver_data = (kernel_ulong_t)&adxl318_chip_info }, + { .name ="adxl319" , .driver_data = (kernel_ulong_t)&adxl319_chip_info }, + { .name ="adxl380" , .driver_data = (kernel_ulong_t)&adxl380_chip_info }, + { .name ="adxl382" , .driver_data = (kernel_ulong_t)&adxl382_chip_info }, { } };MODULE_DEVICE_TABLE (spi, adxl380_spi_id);
drivers/iio/accel/bmi088-accel-spi.c +3 -3
@@ -72,9 +72,9 @@ static const struct of_device_id bmi088_of_match[] = {MODULE_DEVICE_TABLE (of, bmi088_of_match);static const struct spi_device_id bmi088_accel_id[] = { - {"bmi085-accel" ,BOSCH_BMI085 }, - {"bmi088-accel" ,BOSCH_BMI088 }, - {"bmi090l-accel" ,BOSCH_BMI090L }, + { .name ="bmi085-accel" , .driver_data =BOSCH_BMI085 }, + { .name ="bmi088-accel" , .driver_data =BOSCH_BMI088 }, + { .name ="bmi090l-accel" , .driver_data =BOSCH_BMI090L }, { } };MODULE_DEVICE_TABLE (spi, bmi088_accel_id);
drivers/iio/accel/fxls8962af-spi.c +2 -2
@@ -35,8 +35,8 @@ static const struct of_device_id fxls8962af_spi_of_match[] = {MODULE_DEVICE_TABLE (of, fxls8962af_spi_of_match);static const struct spi_device_id fxls8962af_spi_id_table[] = { - {"fxls8962af" , fxls8962af }, - {"fxls8964af" , fxls8964af }, + { .name ="fxls8962af" , .driver_data = fxls8962af }, + { .name ="fxls8964af" , .driver_data = fxls8964af }, { } };MODULE_DEVICE_TABLE (spi, fxls8962af_spi_id_table);
drivers/iio/accel/sca3000.c +4 -4
@@ -1504,10 +1504,10 @@ static int sca3000_probe(struct spi_device *spi) }static const struct spi_device_id sca3000_id[] = { - {"sca3000_d01" , (kernel_ulong_t)&sca3000_chip_info_d01 }, - {"sca3000_e02" , (kernel_ulong_t)&sca3000_chip_info_e02 }, - {"sca3000_e04" , (kernel_ulong_t)&sca3000_chip_info_e04 }, - {"sca3000_e05" , (kernel_ulong_t)&sca3000_chip_info_e05 }, + { .name ="sca3000_d01" , .driver_data = (kernel_ulong_t)&sca3000_chip_info_d01 }, + { .name ="sca3000_e02" , .driver_data = (kernel_ulong_t)&sca3000_chip_info_e02 }, + { .name ="sca3000_e04" , .driver_data = (kernel_ulong_t)&sca3000_chip_info_e04 }, + { .name ="sca3000_e05" , .driver_data = (kernel_ulong_t)&sca3000_chip_info_e05 }, { } };MODULE_DEVICE_TABLE (spi, sca3000_id);
drivers/iio/accel/sca3300.c +2 -2
@@ -664,8 +664,8 @@ static const struct of_device_id sca3300_dt_ids[] = {MODULE_DEVICE_TABLE (of, sca3300_dt_ids);static const struct spi_device_id sca3300_ids[] = { - {"sca3300" }, - {"scl3300" }, + { .name ="sca3300" }, + { .name ="scl3300" }, { } };MODULE_DEVICE_TABLE (spi, sca3300_ids);
drivers/iio/accel/st_accel_spi.c +20 -20
@@ -147,26 +147,26 @@ static int st_accel_spi_probe(struct spi_device *spi) }static const struct spi_device_id st_accel_id_table[] = { - {LIS3DH_ACCEL_DEV_NAME }, - {LSM330D_ACCEL_DEV_NAME }, - {LSM330DL_ACCEL_DEV_NAME }, - {LSM330DLC_ACCEL_DEV_NAME }, - {LIS331DLH_ACCEL_DEV_NAME }, - {LSM330_ACCEL_DEV_NAME }, - {LSM303AGR_ACCEL_DEV_NAME }, - {LIS2DH12_ACCEL_DEV_NAME }, - {LIS2DS12_ACCEL_DEV_NAME }, - {LIS3L02DQ_ACCEL_DEV_NAME }, - {LNG2DM_ACCEL_DEV_NAME }, - {H3LIS331DL_ACCEL_DEV_NAME }, - {LIS331DL_ACCEL_DEV_NAME }, - {LIS3LV02DL_ACCEL_DEV_NAME }, - {LIS2DW12_ACCEL_DEV_NAME }, - {LIS3DHH_ACCEL_DEV_NAME }, - {LIS3DE_ACCEL_DEV_NAME }, - {LIS302DL_ACCEL_DEV_NAME }, - {LSM303C_ACCEL_DEV_NAME }, - {IIS328DQ_ACCEL_DEV_NAME }, + { .name =LIS3DH_ACCEL_DEV_NAME }, + { .name =LSM330D_ACCEL_DEV_NAME }, + { .name =LSM330DL_ACCEL_DEV_NAME }, + { .name =LSM330DLC_ACCEL_DEV_NAME }, + { .name =LIS331DLH_ACCEL_DEV_NAME }, + { .name =LSM330_ACCEL_DEV_NAME }, + { .name =LSM303AGR_ACCEL_DEV_NAME }, + { .name =LIS2DH12_ACCEL_DEV_NAME }, + { .name =LIS2DS12_ACCEL_DEV_NAME }, + { .name =LIS3L02DQ_ACCEL_DEV_NAME }, + { .name =LNG2DM_ACCEL_DEV_NAME }, + { .name =H3LIS331DL_ACCEL_DEV_NAME }, + { .name =LIS331DL_ACCEL_DEV_NAME }, + { .name =LIS3LV02DL_ACCEL_DEV_NAME }, + { .name =LIS2DW12_ACCEL_DEV_NAME }, + { .name =LIS3DHH_ACCEL_DEV_NAME }, + { .name =LIS3DE_ACCEL_DEV_NAME }, + { .name =LIS302DL_ACCEL_DEV_NAME }, + { .name =LSM303C_ACCEL_DEV_NAME }, + { .name =IIS328DQ_ACCEL_DEV_NAME }, { } };MODULE_DEVICE_TABLE (spi, st_accel_id_table);
drivers/iio/adc/ad4000.c +31 -31
68 lines not on this page · raw message
drivers/iio/adc/ad4030.c +7 -7
@@ -1763,13 +1763,13 @@ static const struct ad4030_chip_info adaq4224_chip_info = { };static const struct spi_device_id ad4030_id_table[] = { - {"ad4030-24" , (kernel_ulong_t)&ad4030_24_chip_info }, - {"ad4630-16" , (kernel_ulong_t)&ad4630_16_chip_info }, - {"ad4630-24" , (kernel_ulong_t)&ad4630_24_chip_info }, - {"ad4632-16" , (kernel_ulong_t)&ad4632_16_chip_info }, - {"ad4632-24" , (kernel_ulong_t)&ad4632_24_chip_info }, - {"adaq4216" , (kernel_ulong_t)&adaq4216_chip_info }, - {"adaq4224" , (kernel_ulong_t)&adaq4224_chip_info }, + { .name ="ad4030-24" , .driver_data = (kernel_ulong_t)&ad4030_24_chip_info }, + { .name ="ad4630-16" , .driver_data = (kernel_ulong_t)&ad4630_16_chip_info }, + { .name ="ad4630-24" , .driver_data = (kernel_ulong_t)&ad4630_24_chip_info }, + { .name ="ad4632-16" , .driver_data = (kernel_ulong_t)&ad4632_16_chip_info }, + { .name ="ad4632-24" , .driver_data = (kernel_ulong_t)&ad4632_24_chip_info }, + { .name ="adaq4216" , .driver_data = (kernel_ulong_t)&adaq4216_chip_info }, + { .name ="adaq4224" , .driver_data = (kernel_ulong_t)&adaq4224_chip_info }, { } };MODULE_DEVICE_TABLE (spi, ad4030_id_table);
drivers/iio/adc/ad4080.c +11 -11
@@ -849,17 +849,17 @@ static int ad4080_probe(struct spi_device *spi) }static const struct spi_device_id ad4080_id[] = { - {"ad4080" , (kernel_ulong_t)&ad4080_chip_info }, - {"ad4081" , (kernel_ulong_t)&ad4081_chip_info }, - {"ad4082" , (kernel_ulong_t)&ad4082_chip_info }, - {"ad4083" , (kernel_ulong_t)&ad4083_chip_info }, - {"ad4084" , (kernel_ulong_t)&ad4084_chip_info }, - {"ad4085" , (kernel_ulong_t)&ad4085_chip_info }, - {"ad4086" , (kernel_ulong_t)&ad4086_chip_info }, - {"ad4087" , (kernel_ulong_t)&ad4087_chip_info }, - {"ad4088" , (kernel_ulong_t)&ad4088_chip_info }, - {"ad4880" , (kernel_ulong_t)&ad4880_chip_info }, - {"ad4884" , (kernel_ulong_t)&ad4884_chip_info }, + { .name ="ad4080" , .driver_data = (kernel_ulong_t)&ad4080_chip_info }, + { .name ="ad4081" , .driver_data = (kernel_ulong_t)&ad4081_chip_info }, + { .name ="ad4082" , .driver_data = (kernel_ulong_t)&ad4082_chip_info }, + { .name ="ad4083" , .driver_data = (kernel_ulong_t)&ad4083_chip_info }, + { .name ="ad4084" , .driver_data = (kernel_ulong_t)&ad4084_chip_info }, + { .name ="ad4085" , .driver_data = (kernel_ulong_t)&ad4085_chip_info }, + { .name ="ad4086" , .driver_data = (kernel_ulong_t)&ad4086_chip_info }, + { .name ="ad4087" , .driver_data = (kernel_ulong_t)&ad4087_chip_info }, + { .name ="ad4088" , .driver_data = (kernel_ulong_t)&ad4088_chip_info }, + { .name ="ad4880" , .driver_data = (kernel_ulong_t)&ad4880_chip_info }, + { .name ="ad4884" , .driver_data = (kernel_ulong_t)&ad4884_chip_info }, { } };MODULE_DEVICE_TABLE (spi, ad4080_id);
drivers/iio/adc/ad4130.c +6 -6
@@ -2425,12 +2425,12 @@ static const struct of_device_id ad4130_of_match[] = {MODULE_DEVICE_TABLE (of, ad4130_of_match);static const struct spi_device_id ad4130_id_table[] = { - {"ad4129-4" , (kernel_ulong_t)&ad4129_4_chip_info }, - {"ad4129-8" , (kernel_ulong_t)&ad4129_8_chip_info }, - {"ad4130-4" , (kernel_ulong_t)&ad4130_4_chip_info }, - {"ad4130" , (kernel_ulong_t)&ad4130_8_chip_info }, - {"ad4131-4" , (kernel_ulong_t)&ad4131_4_chip_info }, - {"ad4131-8" , (kernel_ulong_t)&ad4131_8_chip_info }, + { .name ="ad4129-4" , .driver_data = (kernel_ulong_t)&ad4129_4_chip_info }, + { .name ="ad4129-8" , .driver_data = (kernel_ulong_t)&ad4129_8_chip_info }, + { .name ="ad4130-4" , .driver_data = (kernel_ulong_t)&ad4130_4_chip_info }, + { .name ="ad4130" , .driver_data = (kernel_ulong_t)&ad4130_8_chip_info }, + { .name ="ad4131-4" , .driver_data = (kernel_ulong_t)&ad4131_4_chip_info }, + { .name ="ad4131-8" , .driver_data = (kernel_ulong_t)&ad4131_8_chip_info }, { } };MODULE_DEVICE_TABLE (spi, ad4130_id_table);
drivers/iio/adc/ad4134.c +1 -1
@@ -473,7 +473,7 @@ static int ad4134_probe(struct spi_device *spi) }static const struct spi_device_id ad4134_id[] = { - {"ad4134" }, + { .name ="ad4134" }, { } };MODULE_DEVICE_TABLE (spi, ad4134_id);
drivers/iio/adc/ad4170-4.c +3 -3
@@ -2979,9 +2979,9 @@ static int ad4170_probe(struct spi_device *spi) }static const struct spi_device_id ad4170_id_table[] = { - {"ad4170-4" , (kernel_ulong_t)&ad4170_chip_info }, - {"ad4190-4" , (kernel_ulong_t)&ad4190_chip_info }, - {"ad4195-4" , (kernel_ulong_t)&ad4195_chip_info }, + { .name ="ad4170-4" , .driver_data = (kernel_ulong_t)&ad4170_chip_info }, + { .name ="ad4190-4" , .driver_data = (kernel_ulong_t)&ad4190_chip_info }, + { .name ="ad4195-4" , .driver_data = (kernel_ulong_t)&ad4195_chip_info }, { } };MODULE_DEVICE_TABLE (spi, ad4170_id_table);
drivers/iio/adc/ad4851.c +9 -9
@@ -1286,15 +1286,15 @@ static const struct of_device_id ad4851_of_match[] = { };static const struct spi_device_id ad4851_spi_id[] = { - {"ad4851" , (kernel_ulong_t)&ad4851_info }, - {"ad4852" , (kernel_ulong_t)&ad4852_info }, - {"ad4853" , (kernel_ulong_t)&ad4853_info }, - {"ad4854" , (kernel_ulong_t)&ad4854_info }, - {"ad4855" , (kernel_ulong_t)&ad4855_info }, - {"ad4856" , (kernel_ulong_t)&ad4856_info }, - {"ad4857" , (kernel_ulong_t)&ad4857_info }, - {"ad4858" , (kernel_ulong_t)&ad4858_info }, - {"ad4858i" , (kernel_ulong_t)&ad4858i_info }, + { .name ="ad4851" , .driver_data = (kernel_ulong_t)&ad4851_info }, + { .name ="ad4852" , .driver_data = (kernel_ulong_t)&ad4852_info }, + { .name ="ad4853" , .driver_data = (kernel_ulong_t)&ad4853_info }, + { .name ="ad4854" , .driver_data = (kernel_ulong_t)&ad4854_info }, + { .name ="ad4855" , .driver_data = (kernel_ulong_t)&ad4855_info }, + { .name ="ad4856" , .driver_data = (kernel_ulong_t)&ad4856_info }, + { .name ="ad4857" , .driver_data = (kernel_ulong_t)&ad4857_info }, + { .name ="ad4858" , .driver_data = (kernel_ulong_t)&ad4858_info }, + { .name ="ad4858i" , .driver_data = (kernel_ulong_t)&ad4858i_info }, { } };MODULE_DEVICE_TABLE (spi, ad4851_spi_id);
drivers/iio/adc/ad7091r8.c +3 -3
@@ -249,9 +249,9 @@ static const struct of_device_id ad7091r8_of_match[] = {MODULE_DEVICE_TABLE (of, ad7091r8_of_match);static const struct spi_device_id ad7091r8_spi_id[] = { - {"ad7091r2" , (kernel_ulong_t)&ad7091r2_init_info }, - {"ad7091r4" , (kernel_ulong_t)&ad7091r4_init_info }, - {"ad7091r8" , (kernel_ulong_t)&ad7091r8_init_info }, + { .name ="ad7091r2" , .driver_data = (kernel_ulong_t)&ad7091r2_init_info }, + { .name ="ad7091r4" , .driver_data = (kernel_ulong_t)&ad7091r4_init_info }, + { .name ="ad7091r8" , .driver_data = (kernel_ulong_t)&ad7091r8_init_info }, { } };MODULE_DEVICE_TABLE (spi, ad7091r8_spi_id);
drivers/iio/adc/ad7124.c +2 -2
@@ -1684,8 +1684,8 @@ static const struct of_device_id ad7124_of_match[] = {MODULE_DEVICE_TABLE (of, ad7124_of_match);static const struct spi_device_id ad71124_ids[] = { - {"ad7124-4" , (kernel_ulong_t)&ad7124_4_chip_info }, - {"ad7124-8" , (kernel_ulong_t)&ad7124_8_chip_info }, + { .name ="ad7124-4" , .driver_data = (kernel_ulong_t)&ad7124_4_chip_info }, + { .name ="ad7124-8" , .driver_data = (kernel_ulong_t)&ad7124_8_chip_info }, { } };MODULE_DEVICE_TABLE (spi, ad71124_ids);
drivers/iio/adc/ad7173.c +13 -13
@@ -2066,19 +2066,19 @@ static const struct of_device_id ad7173_of_match[] = {MODULE_DEVICE_TABLE (of, ad7173_of_match);static const struct spi_device_id ad7173_id_table[] = { - {"ad4111" , (kernel_ulong_t)&ad4111_device_info }, - {"ad4112" , (kernel_ulong_t)&ad4112_device_info }, - {"ad4113" , (kernel_ulong_t)&ad4113_device_info }, - {"ad4114" , (kernel_ulong_t)&ad4114_device_info }, - {"ad4115" , (kernel_ulong_t)&ad4115_device_info }, - {"ad4116" , (kernel_ulong_t)&ad4116_device_info }, - {"ad7172-2" , (kernel_ulong_t)&ad7172_2_device_info }, - {"ad7172-4" , (kernel_ulong_t)&ad7172_4_device_info }, - {"ad7173-8" , (kernel_ulong_t)&ad7173_8_device_info }, - {"ad7175-2" , (kernel_ulong_t)&ad7175_2_device_info }, - {"ad7175-8" , (kernel_ulong_t)&ad7175_8_device_info }, - {"ad7176-2" , (kernel_ulong_t)&ad7176_2_device_info }, - {"ad7177-2" , (kernel_ulong_t)&ad7177_2_device_info }, + { .name ="ad4111" , .driver_data = (kernel_ulong_t)&ad4111_device_info }, + { .name ="ad4112" , .driver_data = (kernel_ulong_t)&ad4112_device_info }, + { .name ="ad4113" , .driver_data = (kernel_ulong_t)&ad4113_device_info }, + { .name ="ad4114" , .driver_data = (kernel_ulong_t)&ad4114_device_info }, + { .name ="ad4115" , .driver_data = (kernel_ulong_t)&ad4115_device_info }, + { .name ="ad4116" , .driver_data = (kernel_ulong_t)&ad4116_device_info }, + { .name ="ad7172-2" , .driver_data = (kernel_ulong_t)&ad7172_2_device_info }, + { .name ="ad7172-4" , .driver_data = (kernel_ulong_t)&ad7172_4_device_info }, + { .name ="ad7173-8" , .driver_data = (kernel_ulong_t)&ad7173_8_device_info }, + { .name ="ad7175-2" , .driver_data = (kernel_ulong_t)&ad7175_2_device_info }, + { .name ="ad7175-8" , .driver_data = (kernel_ulong_t)&ad7175_8_device_info }, + { .name ="ad7176-2" , .driver_data = (kernel_ulong_t)&ad7176_2_device_info }, + { .name ="ad7177-2" , .driver_data = (kernel_ulong_t)&ad7177_2_device_info }, { } };MODULE_DEVICE_TABLE (spi, ad7173_id_table);
drivers/iio/adc/ad7191.c +1 -1
@@ -536,7 +536,7 @@ static const struct of_device_id ad7191_of_match[] = {MODULE_DEVICE_TABLE (of, ad7191_of_match);static const struct spi_device_id ad7191_id_table[] = { - {"ad7191" }, + { .name ="ad7191" }, { } };MODULE_DEVICE_TABLE (spi, ad7191_id_table);
drivers/iio/adc/ad7192.c +5 -5
@@ -1449,11 +1449,11 @@ static const struct of_device_id ad7192_of_match[] = {MODULE_DEVICE_TABLE (of, ad7192_of_match);static const struct spi_device_id ad7192_ids[] = { - {"ad7190" , (kernel_ulong_t)&ad7192_chip_info_tbl[ID_AD7190 ] }, - {"ad7192" , (kernel_ulong_t)&ad7192_chip_info_tbl[ID_AD7192 ] }, - {"ad7193" , (kernel_ulong_t)&ad7192_chip_info_tbl[ID_AD7193 ] }, - {"ad7194" , (kernel_ulong_t)&ad7192_chip_info_tbl[ID_AD7194 ] }, - {"ad7195" , (kernel_ulong_t)&ad7192_chip_info_tbl[ID_AD7195 ] }, + { .name ="ad7190" , .driver_data = (kernel_ulong_t)&ad7192_chip_info_tbl[ID_AD7190 ] }, + { .name ="ad7192" , .driver_data = (kernel_ulong_t)&ad7192_chip_info_tbl[ID_AD7192 ] }, + { .name ="ad7193" , .driver_data = (kernel_ulong_t)&ad7192_chip_info_tbl[ID_AD7193 ] }, + { .name ="ad7194" , .driver_data = (kernel_ulong_t)&ad7192_chip_info_tbl[ID_AD7194 ] }, + { .name ="ad7195" , .driver_data = (kernel_ulong_t)&ad7192_chip_info_tbl[ID_AD7195 ] }, { } };MODULE_DEVICE_TABLE (spi, ad7192_ids);
drivers/iio/adc/ad7380.c +18 -18
@@ -2116,24 +2116,24 @@ static const struct of_device_id ad7380_of_match_table[] = { };static const struct spi_device_id ad7380_id_table[] = { - {"ad7380" , (kernel_ulong_t)&ad7380_chip_info }, - {"ad7381" , (kernel_ulong_t)&ad7381_chip_info }, - {"ad7383" , (kernel_ulong_t)&ad7383_chip_info }, - {"ad7384" , (kernel_ulong_t)&ad7384_chip_info }, - {"ad7386" , (kernel_ulong_t)&ad7386_chip_info }, - {"ad7387" , (kernel_ulong_t)&ad7387_chip_info }, - {"ad7388" , (kernel_ulong_t)&ad7388_chip_info }, - {"ad7380-4" , (kernel_ulong_t)&ad7380_4_chip_info }, - {"ad7381-4" , (kernel_ulong_t)&ad7381_4_chip_info }, - {"ad7383-4" , (kernel_ulong_t)&ad7383_4_chip_info }, - {"ad7384-4" , (kernel_ulong_t)&ad7384_4_chip_info }, - {"ad7386-4" , (kernel_ulong_t)&ad7386_4_chip_info }, - {"ad7387-4" , (kernel_ulong_t)&ad7387_4_chip_info }, - {"ad7388-4" , (kernel_ulong_t)&ad7388_4_chip_info }, - {"ad7389-4" , (kernel_ulong_t)&ad7389_4_chip_info }, - {"adaq4370-4" , (kernel_ulong_t)&adaq4370_4_chip_info }, - {"adaq4380-4" , (kernel_ulong_t)&adaq4380_4_chip_info }, - {"adaq4381-4" , (kernel_ulong_t)&adaq4381_4_chip_info }, + { .name ="ad7380" , .driver_data = (kernel_ulong_t)&ad7380_chip_info }, + { .name ="ad7381" , .driver_data = (kernel_ulong_t)&ad7381_chip_info }, + { .name ="ad7383" , .driver_data = (kernel_ulong_t)&ad7383_chip_info }, + { .name ="ad7384" , .driver_data = (kernel_ulong_t)&ad7384_chip_info }, + { .name ="ad7386" , .driver_data = (kernel_ulong_t)&ad7386_chip_info }, + { .name ="ad7387" , .driver_data = (kernel_ulong_t)&ad7387_chip_info }, + { .name ="ad7388" , .driver_data = (kernel_ulong_t)&ad7388_chip_info }, + { .name ="ad7380-4" , .driver_data = (kernel_ulong_t)&ad7380_4_chip_info }, + { .name ="ad7381-4" , .driver_data = (kernel_ulong_t)&ad7381_4_chip_info }, + { .name ="ad7383-4" , .driver_data = (kernel_ulong_t)&ad7383_4_chip_info }, + { .name ="ad7384-4" , .driver_data = (kernel_ulong_t)&ad7384_4_chip_info }, + { .name ="ad7386-4" , .driver_data = (kernel_ulong_t)&ad7386_4_chip_info }, + { .name ="ad7387-4" , .driver_data = (kernel_ulong_t)&ad7387_4_chip_info }, + { .name ="ad7388-4" , .driver_data = (kernel_ulong_t)&ad7388_4_chip_info }, + { .name ="ad7389-4" , .driver_data = (kernel_ulong_t)&ad7389_4_chip_info }, + { .name ="adaq4370-4" , .driver_data = (kernel_ulong_t)&adaq4370_4_chip_info }, + { .name ="adaq4380-4" , .driver_data = (kernel_ulong_t)&adaq4380_4_chip_info }, + { .name ="adaq4381-4" , .driver_data = (kernel_ulong_t)&adaq4381_4_chip_info }, { } };MODULE_DEVICE_TABLE (spi, ad7380_id_table);
drivers/iio/adc/ad7476.c +30 -30
72 lines not on this page · raw message
drivers/iio/adc/ad7606_spi.c +11 -11
@@ -463,17 +463,17 @@ static int ad7606_spi_probe(struct spi_device *spi) }static const struct spi_device_id ad7606_id_table[] = { - {"ad7605-4" , (kernel_ulong_t)&ad7605_4_bus_info }, - {"ad7606-4" , (kernel_ulong_t)&ad7606_4_bus_info }, - {"ad7606-6" , (kernel_ulong_t)&ad7606_6_bus_info }, - {"ad7606-8" , (kernel_ulong_t)&ad7606_8_bus_info }, - {"ad7606b" , (kernel_ulong_t)&ad7606b_bus_info }, - {"ad7606c-16" , (kernel_ulong_t)&ad7606c_16_bus_info }, - {"ad7606c-18" , (kernel_ulong_t)&ad7606c_18_bus_info }, - {"ad7607" , (kernel_ulong_t)&ad7607_bus_info }, - {"ad7608" , (kernel_ulong_t)&ad7608_bus_info }, - {"ad7609" , (kernel_ulong_t)&ad7609_bus_info }, - {"ad7616" , (kernel_ulong_t)&ad7616_bus_info }, + { .name ="ad7605-4" , .driver_data = (kernel_ulong_t)&ad7605_4_bus_info }, + { .name ="ad7606-4" , .driver_data = (kernel_ulong_t)&ad7606_4_bus_info }, + { .name ="ad7606-6" , .driver_data = (kernel_ulong_t)&ad7606_6_bus_info }, + { .name ="ad7606-8" , .driver_data = (kernel_ulong_t)&ad7606_8_bus_info }, + { .name ="ad7606b" , .driver_data = (kernel_ulong_t)&ad7606b_bus_info }, + { .name ="ad7606c-16" , .driver_data = (kernel_ulong_t)&ad7606c_16_bus_info }, + { .name ="ad7606c-18" , .driver_data = (kernel_ulong_t)&ad7606c_18_bus_info }, + { .name ="ad7607" , .driver_data = (kernel_ulong_t)&ad7607_bus_info }, + { .name ="ad7608" , .driver_data = (kernel_ulong_t)&ad7608_bus_info }, + { .name ="ad7609" , .driver_data = (kernel_ulong_t)&ad7609_bus_info }, + { .name ="ad7616" , .driver_data = (kernel_ulong_t)&ad7616_bus_info }, { } };MODULE_DEVICE_TABLE (spi, ad7606_id_table);
drivers/iio/adc/ad7766.c +6 -6
@@ -285,12 +285,12 @@ static int ad7766_probe(struct spi_device *spi) }static const struct spi_device_id ad7766_id[] = { - {"ad7766" ,ID_AD7766 }, - {"ad7766-1" ,ID_AD7766_1 }, - {"ad7766-2" ,ID_AD7766_2 }, - {"ad7767" ,ID_AD7766 }, - {"ad7767-1" ,ID_AD7766_1 }, - {"ad7767-2" ,ID_AD7766_2 }, + { .name ="ad7766" , .driver_data =ID_AD7766 }, + { .name ="ad7766-1" , .driver_data =ID_AD7766_1 }, + { .name ="ad7766-2" , .driver_data =ID_AD7766_2 }, + { .name ="ad7767" , .driver_data =ID_AD7766 }, + { .name ="ad7767-1" , .driver_data =ID_AD7766_1 }, + { .name ="ad7767-2" , .driver_data =ID_AD7766_2 }, { } };MODULE_DEVICE_TABLE (spi, ad7766_id);
drivers/iio/adc/ad7768-1.c +4 -4
@@ -1918,10 +1918,10 @@ static int ad7768_probe(struct spi_device *spi) }static const struct spi_device_id ad7768_id_table[] = { - {"ad7768-1" , (kernel_ulong_t)&ad7768_chip_info }, - {"adaq7767-1" , (kernel_ulong_t)&adaq7767_chip_info }, - {"adaq7768-1" , (kernel_ulong_t)&adaq7768_chip_info }, - {"adaq7769-1" , (kernel_ulong_t)&adaq7769_chip_info }, + { .name ="ad7768-1" , .driver_data = (kernel_ulong_t)&ad7768_chip_info }, + { .name ="adaq7767-1" , .driver_data = (kernel_ulong_t)&adaq7767_chip_info }, + { .name ="adaq7768-1" , .driver_data = (kernel_ulong_t)&adaq7768_chip_info }, + { .name ="adaq7769-1" , .driver_data = (kernel_ulong_t)&adaq7769_chip_info }, { } };MODULE_DEVICE_TABLE (spi, ad7768_id_table);
drivers/iio/adc/ad7780.c +4 -4
@@ -347,10 +347,10 @@ static int ad7780_probe(struct spi_device *spi) }static const struct spi_device_id ad7780_id[] = { - {"ad7170" ,ID_AD7170 }, - {"ad7171" ,ID_AD7171 }, - {"ad7780" ,ID_AD7780 }, - {"ad7781" ,ID_AD7781 }, + { .name ="ad7170" , .driver_data =ID_AD7170 }, + { .name ="ad7171" , .driver_data =ID_AD7171 }, + { .name ="ad7780" , .driver_data =ID_AD7780 }, + { .name ="ad7781" , .driver_data =ID_AD7781 }, { } };MODULE_DEVICE_TABLE (spi, ad7780_id);
drivers/iio/adc/ad7791.c +5 -5
@@ -458,11 +458,11 @@ static int ad7791_probe(struct spi_device *spi) }static const struct spi_device_id ad7791_spi_ids[] = { - {"ad7787" ,AD7787 }, - {"ad7788" ,AD7788 }, - {"ad7789" ,AD7789 }, - {"ad7790" ,AD7790 }, - {"ad7791" ,AD7791 }, + { .name ="ad7787" , .driver_data =AD7787 }, + { .name ="ad7788" , .driver_data =AD7788 }, + { .name ="ad7789" , .driver_data =AD7789 }, + { .name ="ad7790" , .driver_data =AD7790 }, + { .name ="ad7791" , .driver_data =AD7791 }, { } };MODULE_DEVICE_TABLE (spi, ad7791_spi_ids);
drivers/iio/adc/ad7793.c +9 -9
@@ -829,15 +829,15 @@ static int ad7793_probe(struct spi_device *spi) }static const struct spi_device_id ad7793_id[] = { - {"ad7785" ,ID_AD7785 }, - {"ad7792" ,ID_AD7792 }, - {"ad7793" ,ID_AD7793 }, - {"ad7794" ,ID_AD7794 }, - {"ad7795" ,ID_AD7795 }, - {"ad7796" ,ID_AD7796 }, - {"ad7797" ,ID_AD7797 }, - {"ad7798" ,ID_AD7798 }, - {"ad7799" ,ID_AD7799 }, + { .name ="ad7785" , .driver_data =ID_AD7785 }, + { .name ="ad7792" , .driver_data =ID_AD7792 }, + { .name ="ad7793" , .driver_data =ID_AD7793 }, + { .name ="ad7794" , .driver_data =ID_AD7794 }, + { .name ="ad7795" , .driver_data =ID_AD7795 }, + { .name ="ad7796" , .driver_data =ID_AD7796 }, + { .name ="ad7797" , .driver_data =ID_AD7797 }, + { .name ="ad7798" , .driver_data =ID_AD7798 }, + { .name ="ad7799" , .driver_data =ID_AD7799 }, { } };MODULE_DEVICE_TABLE (spi, ad7793_id);
drivers/iio/adc/ad7887.c +1 -1
@@ -328,7 +328,7 @@ static int ad7887_probe(struct spi_device *spi) }static const struct spi_device_id ad7887_id[] = { - {"ad7887" ,ID_AD7887 }, + { .name ="ad7887" , .driver_data =ID_AD7887 }, { } };MODULE_DEVICE_TABLE (spi, ad7887_id);
drivers/iio/adc/ad7923.c +7 -7
@@ -360,13 +360,13 @@ static int ad7923_probe(struct spi_device *spi) }static const struct spi_device_id ad7923_id[] = { - {"ad7904" ,AD7904 }, - {"ad7914" ,AD7914 }, - {"ad7923" ,AD7924 }, - {"ad7924" ,AD7924 }, - {"ad7908" ,AD7908 }, - {"ad7918" ,AD7918 }, - {"ad7928" ,AD7928 }, + { .name ="ad7904" , .driver_data =AD7904 }, + { .name ="ad7914" , .driver_data =AD7914 }, + { .name ="ad7923" , .driver_data =AD7924 }, + { .name ="ad7924" , .driver_data =AD7924 }, + { .name ="ad7908" , .driver_data =AD7908 }, + { .name ="ad7918" , .driver_data =AD7918 }, + { .name ="ad7928" , .driver_data =AD7928 }, { } };MODULE_DEVICE_TABLE (spi, ad7923_id);
drivers/iio/adc/ad7944.c +3 -3
@@ -865,9 +865,9 @@ static const struct of_device_id ad7944_of_match[] = {MODULE_DEVICE_TABLE (of, ad7944_of_match);static const struct spi_device_id ad7944_spi_id[] = { - {"ad7944" , (kernel_ulong_t)&ad7944_chip_info }, - {"ad7985" , (kernel_ulong_t)&ad7985_chip_info }, - {"ad7986" , (kernel_ulong_t)&ad7986_chip_info }, + { .name ="ad7944" , .driver_data = (kernel_ulong_t)&ad7944_chip_info }, + { .name ="ad7985" , .driver_data = (kernel_ulong_t)&ad7985_chip_info }, + { .name ="ad7986" , .driver_data = (kernel_ulong_t)&ad7986_chip_info }, { } };
drivers/iio/adc/ad7949.c +3 -3
@@ -410,9 +410,9 @@ static const struct of_device_id ad7949_spi_of_id[] = {MODULE_DEVICE_TABLE (of, ad7949_spi_of_id);static const struct spi_device_id ad7949_spi_id[] = { - {"ad7949" ,ID_AD7949 }, - {"ad7682" ,ID_AD7682 }, - {"ad7689" ,ID_AD7689 }, + { .name ="ad7949" , .driver_data =ID_AD7949 }, + { .name ="ad7682" , .driver_data =ID_AD7682 }, + { .name ="ad7689" , .driver_data =ID_AD7689 }, { } };MODULE_DEVICE_TABLE (spi, ad7949_spi_id);
drivers/iio/adc/ad9467.c +7 -7
@@ -1406,13 +1406,13 @@ static const struct of_device_id ad9467_of_match[] = {MODULE_DEVICE_TABLE (of, ad9467_of_match);static const struct spi_device_id ad9467_ids[] = { - {"ad9211" , (kernel_ulong_t)&ad9211_chip_tbl }, - {"ad9265" , (kernel_ulong_t)&ad9265_chip_tbl }, - {"ad9434" , (kernel_ulong_t)&ad9434_chip_tbl }, - {"ad9467" , (kernel_ulong_t)&ad9467_chip_tbl }, - {"ad9643" , (kernel_ulong_t)&ad9643_chip_tbl }, - {"ad9649" , (kernel_ulong_t)&ad9649_chip_tbl, }, - {"ad9652" , (kernel_ulong_t)&ad9652_chip_tbl, }, + { .name ="ad9211" , .driver_data = (kernel_ulong_t)&ad9211_chip_tbl }, + { .name ="ad9265" , .driver_data = (kernel_ulong_t)&ad9265_chip_tbl }, + { .name ="ad9434" , .driver_data = (kernel_ulong_t)&ad9434_chip_tbl }, + { .name ="ad9467" , .driver_data = (kernel_ulong_t)&ad9467_chip_tbl }, + { .name ="ad9643" , .driver_data = (kernel_ulong_t)&ad9643_chip_tbl }, + { .name ="ad9649" , .driver_data = (kernel_ulong_t)&ad9649_chip_tbl }, + { .name ="ad9652" , .driver_data = (kernel_ulong_t)&ad9652_chip_tbl }, { } };MODULE_DEVICE_TABLE (spi, ad9467_ids);
drivers/iio/adc/max1027.c +6 -6
@@ -73,12 +73,12 @@ enum max1027_id { };static const struct spi_device_id max1027_id[] = { - {"max1027" , max1027 }, - {"max1029" , max1029 }, - {"max1031" , max1031 }, - {"max1227" , max1227 }, - {"max1229" , max1229 }, - {"max1231" , max1231 }, + { .name ="max1027" , .driver_data = max1027 }, + { .name ="max1029" , .driver_data = max1029 }, + { .name ="max1031" , .driver_data = max1031 }, + { .name ="max1227" , .driver_data = max1227 }, + { .name ="max1229" , .driver_data = max1229 }, + { .name ="max1231" , .driver_data = max1231 }, { } };MODULE_DEVICE_TABLE (spi, max1027_id);
drivers/iio/adc/max1118.c +3 -3
@@ -257,9 +257,9 @@ static int max1118_probe(struct spi_device *spi) }static const struct spi_device_id max1118_id[] = { - {"max1117" , max1117 }, - {"max1118" , max1118 }, - {"max1119" , max1119 }, + { .name ="max1117" , .driver_data = max1117 }, + { .name ="max1118" , .driver_data = max1118 }, + { .name ="max1119" , .driver_data = max1119 }, { } };MODULE_DEVICE_TABLE (spi, max1118_id);
drivers/iio/adc/max11205.c +2 -2
@@ -145,8 +145,8 @@ static int max11205_probe(struct spi_device *spi) }static const struct spi_device_id max11205_spi_ids[] = { - {"max11205a" , (kernel_ulong_t)&max11205_chip_info[TYPE_MAX11205A ] }, - {"max11205b" , (kernel_ulong_t)&max11205_chip_info[TYPE_MAX11205B ] }, + { .name ="max11205a" , .driver_data = (kernel_ulong_t)&max11205_chip_info[TYPE_MAX11205A ] }, + { .name ="max11205b" , .driver_data = (kernel_ulong_t)&max11205_chip_info[TYPE_MAX11205B ] }, { } };MODULE_DEVICE_TABLE (spi, max11205_spi_ids);
drivers/iio/adc/max11410.c +1 -1
@@ -1025,7 +1025,7 @@ static const struct of_device_id max11410_spi_of_id[] = {MODULE_DEVICE_TABLE (of, max11410_spi_of_id);static const struct spi_device_id max11410_id[] = { - {"max11410" }, + { .name ="max11410" }, { } };MODULE_DEVICE_TABLE (spi, max11410_id);
drivers/iio/adc/max14001.c +2 -2
@@ -363,8 +363,8 @@ static struct max14001_chip_info max14002_chip_info = { };static const struct spi_device_id max14001_id_table[] = { - {"max14001" , (kernel_ulong_t)&max14001_chip_info }, - {"max14002" , (kernel_ulong_t)&max14002_chip_info }, + { .name ="max14001" , .driver_data = (kernel_ulong_t)&max14001_chip_info }, + { .name ="max14002" , .driver_data = (kernel_ulong_t)&max14002_chip_info }, { } };
drivers/iio/adc/mcp320x.c +13 -13
@@ -477,19 +477,19 @@ static const struct of_device_id mcp320x_dt_ids[] = {MODULE_DEVICE_TABLE (of, mcp320x_dt_ids);static const struct spi_device_id mcp320x_id[] = { - {"mcp3001" , mcp3001 }, - {"mcp3002" , mcp3002 }, - {"mcp3004" , mcp3004 }, - {"mcp3008" , mcp3008 }, - {"mcp3201" , mcp3201 }, - {"mcp3202" , mcp3202 }, - {"mcp3204" , mcp3204 }, - {"mcp3208" , mcp3208 }, - {"mcp3301" , mcp3301 }, - {"mcp3550-50" , mcp3550_50 }, - {"mcp3550-60" , mcp3550_60 }, - {"mcp3551" , mcp3551 }, - {"mcp3553" , mcp3553 }, + { .name ="mcp3001" , .driver_data = mcp3001 }, + { .name ="mcp3002" , .driver_data = mcp3002 }, + { .name ="mcp3004" , .driver_data = mcp3004 }, + { .name ="mcp3008" , .driver_data = mcp3008 }, + { .name ="mcp3201" , .driver_data = mcp3201 }, + { .name ="mcp3202" , .driver_data = mcp3202 }, + { .name ="mcp3204" , .driver_data = mcp3204 }, + { .name ="mcp3208" , .driver_data = mcp3208 }, + { .name ="mcp3301" , .driver_data = mcp3301 }, + { .name ="mcp3550-50" , .driver_data = mcp3550_50 }, + { .name ="mcp3550-60" , .driver_data = mcp3550_60 }, + { .name ="mcp3551" , .driver_data = mcp3551 }, + { .name ="mcp3553" , .driver_data = mcp3553 }, { } };MODULE_DEVICE_TABLE (spi, mcp320x_id);
drivers/iio/adc/mcp3564.c +12 -12
@@ -1451,18 +1451,18 @@ static const struct of_device_id mcp3564_dt_ids[] = {MODULE_DEVICE_TABLE (of, mcp3564_dt_ids);static const struct spi_device_id mcp3564_id[] = { - {"mcp3461" , (kernel_ulong_t)&mcp3564_chip_infos_tbl[mcp3461] }, - {"mcp3462" , (kernel_ulong_t)&mcp3564_chip_infos_tbl[mcp3462] }, - {"mcp3464" , (kernel_ulong_t)&mcp3564_chip_infos_tbl[mcp3464] }, - {"mcp3561" , (kernel_ulong_t)&mcp3564_chip_infos_tbl[mcp3561] }, - {"mcp3562" , (kernel_ulong_t)&mcp3564_chip_infos_tbl[mcp3562] }, - {"mcp3564" , (kernel_ulong_t)&mcp3564_chip_infos_tbl[mcp3564] }, - {"mcp3461r" , (kernel_ulong_t)&mcp3564_chip_infos_tbl[mcp3461r] }, - {"mcp3462r" , (kernel_ulong_t)&mcp3564_chip_infos_tbl[mcp3462r] }, - {"mcp3464r" , (kernel_ulong_t)&mcp3564_chip_infos_tbl[mcp3464r] }, - {"mcp3561r" , (kernel_ulong_t)&mcp3564_chip_infos_tbl[mcp3561r] }, - {"mcp3562r" , (kernel_ulong_t)&mcp3564_chip_infos_tbl[mcp3562r] }, - {"mcp3564r" , (kernel_ulong_t)&mcp3564_chip_infos_tbl[mcp3564r] }, + { .name ="mcp3461" , .driver_data = (kernel_ulong_t)&mcp3564_chip_infos_tbl[mcp3461] }, + { .name ="mcp3462" , .driver_data = (kernel_ulong_t)&mcp3564_chip_infos_tbl[mcp3462] }, + { .name ="mcp3464" , .driver_data = (kernel_ulong_t)&mcp3564_chip_infos_tbl[mcp3464] }, + { .name ="mcp3561" , .driver_data = (kernel_ulong_t)&mcp3564_chip_infos_tbl[mcp3561] }, + { .name ="mcp3562" , .driver_data = (kernel_ulong_t)&mcp3564_chip_infos_tbl[mcp3562] }, + { .name ="mcp3564" , .driver_data = (kernel_ulong_t)&mcp3564_chip_infos_tbl[mcp3564] }, + { .name ="mcp3461r" , .driver_data = (kernel_ulong_t)&mcp3564_chip_infos_tbl[mcp3461r] }, + { .name ="mcp3462r" , .driver_data = (kernel_ulong_t)&mcp3564_chip_infos_tbl[mcp3462r] }, + { .name ="mcp3464r" , .driver_data = (kernel_ulong_t)&mcp3564_chip_infos_tbl[mcp3464r] }, + { .name ="mcp3561r" , .driver_data = (kernel_ulong_t)&mcp3564_chip_infos_tbl[mcp3561r] }, + { .name ="mcp3562r" , .driver_data = (kernel_ulong_t)&mcp3564_chip_infos_tbl[mcp3562r] }, + { .name ="mcp3564r" , .driver_data = (kernel_ulong_t)&mcp3564_chip_infos_tbl[mcp3564r] }, { } };MODULE_DEVICE_TABLE (spi, mcp3564_id);
drivers/iio/adc/mcp3911.c +7 -7
@@ -928,13 +928,13 @@ static const struct of_device_id mcp3911_dt_ids[] = {MODULE_DEVICE_TABLE (of, mcp3911_dt_ids);static const struct spi_device_id mcp3911_id[] = { - {"mcp3910" , (kernel_ulong_t)&mcp3911_chip_info[MCP3910 ] }, - {"mcp3911" , (kernel_ulong_t)&mcp3911_chip_info[MCP3911 ] }, - {"mcp3912" , (kernel_ulong_t)&mcp3911_chip_info[MCP3912 ] }, - {"mcp3913" , (kernel_ulong_t)&mcp3911_chip_info[MCP3913 ] }, - {"mcp3914" , (kernel_ulong_t)&mcp3911_chip_info[MCP3914 ] }, - {"mcp3918" , (kernel_ulong_t)&mcp3911_chip_info[MCP3918 ] }, - {"mcp3919" , (kernel_ulong_t)&mcp3911_chip_info[MCP3919 ] }, + { .name ="mcp3910" , .driver_data = (kernel_ulong_t)&mcp3911_chip_info[MCP3910 ] }, + { .name ="mcp3911" , .driver_data = (kernel_ulong_t)&mcp3911_chip_info[MCP3911 ] }, + { .name ="mcp3912" , .driver_data = (kernel_ulong_t)&mcp3911_chip_info[MCP3912 ] }, + { .name ="mcp3913" , .driver_data = (kernel_ulong_t)&mcp3911_chip_info[MCP3913 ] }, + { .name ="mcp3914" , .driver_data = (kernel_ulong_t)&mcp3911_chip_info[MCP3914 ] }, + { .name ="mcp3918" , .driver_data = (kernel_ulong_t)&mcp3911_chip_info[MCP3918 ] }, + { .name ="mcp3919" , .driver_data = (kernel_ulong_t)&mcp3911_chip_info[MCP3919 ] }, { } };MODULE_DEVICE_TABLE (spi, mcp3911_id);
drivers/iio/adc/rohm-bd79112.c +1 -1
@@ -530,7 +530,7 @@ static const struct of_device_id bd79112_of_match[] = {MODULE_DEVICE_TABLE (of, bd79112_of_match);static const struct spi_device_id bd79112_id[] = { - {"bd79112" }, + { .name ="bd79112" }, { } };MODULE_DEVICE_TABLE (spi, bd79112_id);
drivers/iio/adc/ti-adc0832.c +4 -4
@@ -314,10 +314,10 @@ static const struct of_device_id adc0832_dt_ids[] = {MODULE_DEVICE_TABLE (of, adc0832_dt_ids);static const struct spi_device_id adc0832_id[] = { - {"adc0831" , adc0831 }, - {"adc0832" , adc0832 }, - {"adc0834" , adc0834 }, - {"adc0838" , adc0838 }, + { .name ="adc0831" , .driver_data = adc0831 }, + { .name ="adc0832" , .driver_data = adc0832 }, + { .name ="adc0834" , .driver_data = adc0834 }, + { .name ="adc0838" , .driver_data = adc0838 }, { } };MODULE_DEVICE_TABLE (spi, adc0832_id);
drivers/iio/adc/ti-adc12138.c +3 -3
@@ -516,9 +516,9 @@ static const struct of_device_id adc12138_dt_ids[] = {MODULE_DEVICE_TABLE (of, adc12138_dt_ids);static const struct spi_device_id adc12138_id[] = { - {"adc12130" , adc12130 }, - {"adc12132" , adc12132 }, - {"adc12138" , adc12138 }, + { .name ="adc12130" , .driver_data = adc12130 }, + { .name ="adc12132" , .driver_data = adc12132 }, + { .name ="adc12138" , .driver_data = adc12138 }, { } };MODULE_DEVICE_TABLE (spi, adc12138_id);
drivers/iio/adc/ti-adc128s052.c +12 -12
@@ -248,18 +248,18 @@ static const struct of_device_id adc128_of_match[] = {MODULE_DEVICE_TABLE (of, adc128_of_match);static const struct spi_device_id adc128_id[] = { - {"adc128s052" , (kernel_ulong_t)&adc128s_config }, - {"adc122s021" , (kernel_ulong_t)&adc122s_config }, - {"adc122s051" , (kernel_ulong_t)&adc122s_config }, - {"adc122s101" , (kernel_ulong_t)&adc122s_config }, - {"adc124s021" , (kernel_ulong_t)&adc124s_config }, - {"adc124s051" , (kernel_ulong_t)&adc124s_config }, - {"adc124s101" , (kernel_ulong_t)&adc124s_config }, - {"bd79100" , (kernel_ulong_t)&bd79100_config }, - {"bd79101" , (kernel_ulong_t)&bd79101_config }, - {"bd79102" , (kernel_ulong_t)&bd79102_config }, - {"bd79103" , (kernel_ulong_t)&bd79104_config }, - {"bd79104" , (kernel_ulong_t)&bd79104_config }, + { .name ="adc128s052" , .driver_data = (kernel_ulong_t)&adc128s_config }, + { .name ="adc122s021" , .driver_data = (kernel_ulong_t)&adc122s_config }, + { .name ="adc122s051" , .driver_data = (kernel_ulong_t)&adc122s_config }, + { .name ="adc122s101" , .driver_data = (kernel_ulong_t)&adc122s_config }, + { .name ="adc124s021" , .driver_data = (kernel_ulong_t)&adc124s_config }, + { .name ="adc124s051" , .driver_data = (kernel_ulong_t)&adc124s_config }, + { .name ="adc124s101" , .driver_data = (kernel_ulong_t)&adc124s_config }, + { .name ="bd79100" , .driver_data = (kernel_ulong_t)&bd79100_config }, + { .name ="bd79101" , .driver_data = (kernel_ulong_t)&bd79101_config }, + { .name ="bd79102" , .driver_data = (kernel_ulong_t)&bd79102_config }, + { .name ="bd79103" , .driver_data = (kernel_ulong_t)&bd79104_config }, + { .name ="bd79104" , .driver_data = (kernel_ulong_t)&bd79104_config }, { } };MODULE_DEVICE_TABLE (spi, adc128_id);
drivers/iio/adc/ti-adc161s626.c +2 -2
@@ -230,8 +230,8 @@ static const struct of_device_id ti_adc_dt_ids[] = {MODULE_DEVICE_TABLE (of, ti_adc_dt_ids);static const struct spi_device_id ti_adc_id[] = { - {"adc141s626" ,TI_ADC141S626 }, - {"adc161s626" ,TI_ADC161S626 }, + { .name ="adc141s626" , .driver_data =TI_ADC141S626 }, + { .name ="adc161s626" , .driver_data =TI_ADC161S626 }, { } };MODULE_DEVICE_TABLE (spi, ti_adc_id);
drivers/iio/adc/ti-ads1018.c +2 -2
@@ -718,8 +718,8 @@ static const struct of_device_id ads1018_of_match[] = {MODULE_DEVICE_TABLE (of, ads1018_of_match);static const struct spi_device_id ads1018_spi_match[] = { - {"ads1018" , (kernel_ulong_t)&ads1018_chip_info }, - {"ads1118" , (kernel_ulong_t)&ads1118_chip_info }, + { .name ="ads1018" , .driver_data = (kernel_ulong_t)&ads1018_chip_info }, + { .name ="ads1118" , .driver_data = (kernel_ulong_t)&ads1118_chip_info }, { } };MODULE_DEVICE_TABLE (spi, ads1018_spi_match);
drivers/iio/adc/ti-ads124s08.c +2 -2
@@ -348,8 +348,8 @@ static int ads124s_probe(struct spi_device *spi) }static const struct spi_device_id ads124s_id[] = { - {"ads124s06" ,ADS124S06_ID }, - {"ads124s08" ,ADS124S08_ID }, + { .name ="ads124s06" , .driver_data =ADS124S06_ID }, + { .name ="ads124s08" , .driver_data =ADS124S08_ID }, { } };MODULE_DEVICE_TABLE (spi, ads124s_id);
drivers/iio/adc/ti-ads1298.c +1 -1
@@ -743,7 +743,7 @@ static int ads1298_probe(struct spi_device *spi) }static const struct spi_device_id ads1298_id[] = { - {"ads1298" }, + { .name ="ads1298" }, { } };MODULE_DEVICE_TABLE (spi, ads1298_id);
drivers/iio/adc/ti-ads131e08.c +3 -3
@@ -917,9 +917,9 @@ static const struct of_device_id ads131e08_of_match[] = {MODULE_DEVICE_TABLE (of, ads131e08_of_match);static const struct spi_device_id ads131e08_ids[] = { - {"ads131e04" , (kernel_ulong_t)&ads131e08_info_tbl[ads131e04] }, - {"ads131e06" , (kernel_ulong_t)&ads131e08_info_tbl[ads131e06] }, - {"ads131e08" , (kernel_ulong_t)&ads131e08_info_tbl[ads131e08] }, + { .name ="ads131e04" , .driver_data = (kernel_ulong_t)&ads131e08_info_tbl[ads131e04] }, + { .name ="ads131e06" , .driver_data = (kernel_ulong_t)&ads131e08_info_tbl[ads131e06] }, + { .name ="ads131e08" , .driver_data = (kernel_ulong_t)&ads131e08_info_tbl[ads131e08] }, { } };MODULE_DEVICE_TABLE (spi, ads131e08_ids);
drivers/iio/adc/ti-ads131m02.c +5 -5
@@ -944,11 +944,11 @@ static const struct of_device_id ads131m_of_match[] = {MODULE_DEVICE_TABLE (of, ads131m_of_match);static const struct spi_device_id ads131m_id[] = { - {"ads131m02" , (kernel_ulong_t)&ads131m02_config }, - {"ads131m03" , (kernel_ulong_t)&ads131m03_config }, - {"ads131m04" , (kernel_ulong_t)&ads131m04_config }, - {"ads131m06" , (kernel_ulong_t)&ads131m06_config }, - {"ads131m08" , (kernel_ulong_t)&ads131m08_config }, + { .name ="ads131m02" , .driver_data = (kernel_ulong_t)&ads131m02_config }, + { .name ="ads131m03" , .driver_data = (kernel_ulong_t)&ads131m03_config }, + { .name ="ads131m04" , .driver_data = (kernel_ulong_t)&ads131m04_config }, + { .name ="ads131m06" , .driver_data = (kernel_ulong_t)&ads131m06_config }, + { .name ="ads131m08" , .driver_data = (kernel_ulong_t)&ads131m08_config }, { } };MODULE_DEVICE_TABLE (spi, ads131m_id);
drivers/iio/adc/ti-ads7950.c +12 -12
@@ -619,18 +619,18 @@ static int ti_ads7950_probe(struct spi_device *spi) }static const struct spi_device_id ti_ads7950_id[] = { - {"ads7950" , (kernel_ulong_t)&ti_ads7950_chip_info }, - {"ads7951" , (kernel_ulong_t)&ti_ads7951_chip_info }, - {"ads7952" , (kernel_ulong_t)&ti_ads7952_chip_info }, - {"ads7953" , (kernel_ulong_t)&ti_ads7953_chip_info }, - {"ads7954" , (kernel_ulong_t)&ti_ads7954_chip_info }, - {"ads7955" , (kernel_ulong_t)&ti_ads7955_chip_info }, - {"ads7956" , (kernel_ulong_t)&ti_ads7956_chip_info }, - {"ads7957" , (kernel_ulong_t)&ti_ads7957_chip_info }, - {"ads7958" , (kernel_ulong_t)&ti_ads7958_chip_info }, - {"ads7959" , (kernel_ulong_t)&ti_ads7959_chip_info }, - {"ads7960" , (kernel_ulong_t)&ti_ads7960_chip_info }, - {"ads7961" , (kernel_ulong_t)&ti_ads7961_chip_info }, + { .name ="ads7950" , .driver_data = (kernel_ulong_t)&ti_ads7950_chip_info }, + { .name ="ads7951" , .driver_data = (kernel_ulong_t)&ti_ads7951_chip_info }, + { .name ="ads7952" , .driver_data = (kernel_ulong_t)&ti_ads7952_chip_info }, + { .name ="ads7953" , .driver_data = (kernel_ulong_t)&ti_ads7953_chip_info }, + { .name ="ads7954" , .driver_data = (kernel_ulong_t)&ti_ads7954_chip_info }, + { .name ="ads7955" , .driver_data = (kernel_ulong_t)&ti_ads7955_chip_info }, + { .name ="ads7956" , .driver_data = (kernel_ulong_t)&ti_ads7956_chip_info }, + { .name ="ads7957" , .driver_data = (kernel_ulong_t)&ti_ads7957_chip_info }, + { .name ="ads7958" , .driver_data = (kernel_ulong_t)&ti_ads7958_chip_info }, + { .name ="ads7959" , .driver_data = (kernel_ulong_t)&ti_ads7959_chip_info }, + { .name ="ads7960" , .driver_data = (kernel_ulong_t)&ti_ads7960_chip_info }, + { .name ="ads7961" , .driver_data = (kernel_ulong_t)&ti_ads7961_chip_info }, { } };MODULE_DEVICE_TABLE (spi, ti_ads7950_id);
drivers/iio/adc/ti-ads8688.c +2 -2
@@ -454,8 +454,8 @@ static int ads8688_probe(struct spi_device *spi) }static const struct spi_device_id ads8688_id[] = { - {"ads8684" ,ID_ADS8684 }, - {"ads8688" ,ID_ADS8688 }, + { .name ="ads8684" , .driver_data =ID_ADS8684 }, + { .name ="ads8688" , .driver_data =ID_ADS8688 }, { } };MODULE_DEVICE_TABLE (spi, ads8688_id);
drivers/iio/adc/ti-lmp92064.c +1 -1
@@ -357,7 +357,7 @@ static int lmp92064_adc_probe(struct spi_device *spi) }static const struct spi_device_id lmp92064_id_table[] = { - {"lmp92064" }, + { .name ="lmp92064" }, { } };MODULE_DEVICE_TABLE (spi, lmp92064_id_table);
drivers/iio/adc/ti-tlc4541.c +2 -2
@@ -241,8 +241,8 @@ static const struct of_device_id tlc4541_dt_ids[] = {MODULE_DEVICE_TABLE (of, tlc4541_dt_ids);static const struct spi_device_id tlc4541_id[] = { - {"tlc3541" ,TLC3541 }, - {"tlc4541" ,TLC4541 }, + { .name ="tlc3541" , .driver_data =TLC3541 }, + { .name ="tlc4541" , .driver_data =TLC4541 }, { } };MODULE_DEVICE_TABLE (spi, tlc4541_id);
drivers/iio/addac/ad74115.c +1 -1
@@ -1904,7 +1904,7 @@ static int __init ad74115_register_driver(struct spi_driver *spi) }static const struct spi_device_id ad74115_spi_id[] = { - {"ad74115h" }, + { .name ="ad74115h" }, { } };
drivers/iio/amplifiers/ad8366.c +13 -13
@@ -352,19 +352,19 @@ static int ad8366_probe(struct spi_device *spi) }static const struct spi_device_id ad8366_id[] = { - {"ad8366" , (kernel_ulong_t)&ad8366_chip_info }, - {"ada4961" , (kernel_ulong_t)&ada4961_chip_info }, - {"adl5240" , (kernel_ulong_t)&adl5240_chip_info }, - {"adrf5702" , (kernel_ulong_t)&adrf5702_chip_info }, - {"adrf5703" , (kernel_ulong_t)&adrf5703_chip_info }, - {"adrf5720" , (kernel_ulong_t)&adrf5720_chip_info }, - {"adrf5730" , (kernel_ulong_t)&adrf5730_chip_info }, - {"adrf5731" , (kernel_ulong_t)&adrf5731_chip_info }, - {"hmc271a" , (kernel_ulong_t)&hmc271_chip_info }, - {"hmc792a" , (kernel_ulong_t)&hmc792_chip_info }, - {"hmc1018a" , (kernel_ulong_t)&hmc1018_chip_info }, - {"hmc1019a" , (kernel_ulong_t)&hmc1019_chip_info }, - {"hmc1119" , (kernel_ulong_t)&hmc1119_chip_info }, + { .name ="ad8366" , .driver_data = (kernel_ulong_t)&ad8366_chip_info }, + { .name ="ada4961" , .driver_data = (kernel_ulong_t)&ada4961_chip_info }, + { .name ="adl5240" , .driver_data = (kernel_ulong_t)&adl5240_chip_info }, + { .name ="adrf5702" , .driver_data = (kernel_ulong_t)&adrf5702_chip_info }, + { .name ="adrf5703" , .driver_data = (kernel_ulong_t)&adrf5703_chip_info }, + { .name ="adrf5720" , .driver_data = (kernel_ulong_t)&adrf5720_chip_info }, + { .name ="adrf5730" , .driver_data = (kernel_ulong_t)&adrf5730_chip_info }, + { .name ="adrf5731" , .driver_data = (kernel_ulong_t)&adrf5731_chip_info }, + { .name ="hmc271a" , .driver_data = (kernel_ulong_t)&hmc271_chip_info }, + { .name ="hmc792a" , .driver_data = (kernel_ulong_t)&hmc792_chip_info }, + { .name ="hmc1018a" , .driver_data = (kernel_ulong_t)&hmc1018_chip_info }, + { .name ="hmc1019a" , .driver_data = (kernel_ulong_t)&hmc1019_chip_info }, + { .name ="hmc1119" , .driver_data = (kernel_ulong_t)&hmc1119_chip_info }, { } };MODULE_DEVICE_TABLE (spi, ad8366_id);
drivers/iio/chemical/ens160_spi.c +1 -1
@@ -39,7 +39,7 @@ static const struct of_device_id ens160_spi_of_match[] = {MODULE_DEVICE_TABLE (of, ens160_spi_of_match);static const struct spi_device_id ens160_spi_id[] = { - {"ens160" }, + { .name ="ens160" }, { } };MODULE_DEVICE_TABLE (spi, ens160_spi_id);
drivers/iio/dac/ad3530r.c +4 -4
@@ -510,10 +510,10 @@ static int ad3530r_probe(struct spi_device *spi) }static const struct spi_device_id ad3530r_id[] = { - {"ad3530" , (kernel_ulong_t)&ad3530_chip }, - {"ad3530r" , (kernel_ulong_t)&ad3530r_chip }, - {"ad3531" , (kernel_ulong_t)&ad3531_chip }, - {"ad3531r" , (kernel_ulong_t)&ad3531r_chip }, + { .name ="ad3530" , .driver_data = (kernel_ulong_t)&ad3530_chip }, + { .name ="ad3530r" , .driver_data = (kernel_ulong_t)&ad3530r_chip }, + { .name ="ad3531" , .driver_data = (kernel_ulong_t)&ad3531_chip }, + { .name ="ad3531r" , .driver_data = (kernel_ulong_t)&ad3531r_chip }, { } };MODULE_DEVICE_TABLE (spi, ad3530r_id);
drivers/iio/dac/ad5064.c +16 -16
@@ -920,22 +920,22 @@ static int ad5064_spi_probe(struct spi_device *spi) }static const struct spi_device_id ad5064_spi_ids[] = { - {"ad5024" ,ID_AD5024 }, - {"ad5025" ,ID_AD5025 }, - {"ad5044" ,ID_AD5044 }, - {"ad5045" ,ID_AD5045 }, - {"ad5064" ,ID_AD5064 }, - {"ad5064-1" ,ID_AD5064_1 }, - {"ad5065" ,ID_AD5065 }, - {"ad5628-1" ,ID_AD5628_1 }, - {"ad5628-2" ,ID_AD5628_2 }, - {"ad5648-1" ,ID_AD5648_1 }, - {"ad5648-2" ,ID_AD5648_2 }, - {"ad5666-1" ,ID_AD5666_1 }, - {"ad5666-2" ,ID_AD5666_2 }, - {"ad5668-1" ,ID_AD5668_1 }, - {"ad5668-2" ,ID_AD5668_2 }, - {"ad5668-3" ,ID_AD5668_2 },/* similar enough to ad5668-2 */ + { .name ="ad5024" , .driver_data =ID_AD5024 }, + { .name ="ad5025" , .driver_data =ID_AD5025 }, + { .name ="ad5044" , .driver_data =ID_AD5044 }, + { .name ="ad5045" , .driver_data =ID_AD5045 }, + { .name ="ad5064" , .driver_data =ID_AD5064 }, + { .name ="ad5064-1" , .driver_data =ID_AD5064_1 }, + { .name ="ad5065" , .driver_data =ID_AD5065 }, + { .name ="ad5628-1" , .driver_data =ID_AD5628_1 }, + { .name ="ad5628-2" , .driver_data =ID_AD5628_2 }, + { .name ="ad5648-1" , .driver_data =ID_AD5648_1 }, + { .name ="ad5648-2" , .driver_data =ID_AD5648_2 }, + { .name ="ad5666-1" , .driver_data =ID_AD5666_1 }, + { .name ="ad5666-2" , .driver_data =ID_AD5666_2 }, + { .name ="ad5668-1" , .driver_data =ID_AD5668_1 }, + { .name ="ad5668-2" , .driver_data =ID_AD5668_2 }, + { .name ="ad5668-3" , .driver_data =ID_AD5668_2 },/* similar enough to ad5668-2 */ { } };MODULE_DEVICE_TABLE (spi, ad5064_spi_ids);
drivers/iio/dac/ad5360.c +8 -8
@@ -523,14 +523,14 @@ static void ad5360_remove(struct spi_device *spi) }static const struct spi_device_id ad5360_ids[] = { - {"ad5360" ,ID_AD5360 }, - {"ad5361" ,ID_AD5361 }, - {"ad5362" ,ID_AD5362 }, - {"ad5363" ,ID_AD5363 }, - {"ad5370" ,ID_AD5370 }, - {"ad5371" ,ID_AD5371 }, - {"ad5372" ,ID_AD5372 }, - {"ad5373" ,ID_AD5373 }, + { .name ="ad5360" , .driver_data =ID_AD5360 }, + { .name ="ad5361" , .driver_data =ID_AD5361 }, + { .name ="ad5362" , .driver_data =ID_AD5362 }, + { .name ="ad5363" , .driver_data =ID_AD5363 }, + { .name ="ad5370" , .driver_data =ID_AD5370 }, + { .name ="ad5371" , .driver_data =ID_AD5371 }, + { .name ="ad5372" , .driver_data =ID_AD5372 }, + { .name ="ad5373" , .driver_data =ID_AD5373 }, { } };MODULE_DEVICE_TABLE (spi, ad5360_ids);
drivers/iio/dac/ad5380.c +16 -16
@@ -446,22 +446,22 @@ static int ad5380_spi_probe(struct spi_device *spi) }static const struct spi_device_id ad5380_spi_ids[] = { - {"ad5380-3" ,ID_AD5380_3 }, - {"ad5380-5" ,ID_AD5380_5 }, - {"ad5381-3" ,ID_AD5381_3 }, - {"ad5381-5" ,ID_AD5381_5 }, - {"ad5382-3" ,ID_AD5382_3 }, - {"ad5382-5" ,ID_AD5382_5 }, - {"ad5383-3" ,ID_AD5383_3 }, - {"ad5383-5" ,ID_AD5383_5 }, - {"ad5384-3" ,ID_AD5380_3 }, - {"ad5384-5" ,ID_AD5380_5 }, - {"ad5390-3" ,ID_AD5390_3 }, - {"ad5390-5" ,ID_AD5390_5 }, - {"ad5391-3" ,ID_AD5391_3 }, - {"ad5391-5" ,ID_AD5391_5 }, - {"ad5392-3" ,ID_AD5392_3 }, - {"ad5392-5" ,ID_AD5392_5 }, + { .name ="ad5380-3" , .driver_data =ID_AD5380_3 }, + { .name ="ad5380-5" , .driver_data =ID_AD5380_5 }, + { .name ="ad5381-3" , .driver_data =ID_AD5381_3 }, + { .name ="ad5381-5" , .driver_data =ID_AD5381_5 }, + { .name ="ad5382-3" , .driver_data =ID_AD5382_3 }, + { .name ="ad5382-5" , .driver_data =ID_AD5382_5 }, + { .name ="ad5383-3" , .driver_data =ID_AD5383_3 }, + { .name ="ad5383-5" , .driver_data =ID_AD5383_5 }, + { .name ="ad5384-3" , .driver_data =ID_AD5380_3 }, + { .name ="ad5384-5" , .driver_data =ID_AD5380_5 }, + { .name ="ad5390-3" , .driver_data =ID_AD5390_3 }, + { .name ="ad5390-5" , .driver_data =ID_AD5390_5 }, + { .name ="ad5391-3" , .driver_data =ID_AD5391_3 }, + { .name ="ad5391-5" , .driver_data =ID_AD5391_5 }, + { .name ="ad5392-3" , .driver_data =ID_AD5392_3 }, + { .name ="ad5392-5" , .driver_data =ID_AD5392_5 }, { } };MODULE_DEVICE_TABLE (spi, ad5380_spi_ids);
drivers/iio/dac/ad5446-spi.c +31 -31
69 lines not on this page · raw message
drivers/iio/dac/ad5449.c +7 -7
@@ -330,13 +330,13 @@ static void ad5449_spi_remove(struct spi_device *spi) }static const struct spi_device_id ad5449_spi_ids[] = { - {"ad5415" ,ID_AD5449 }, - {"ad5426" ,ID_AD5426 }, - {"ad5429" ,ID_AD5429 }, - {"ad5432" ,ID_AD5432 }, - {"ad5439" ,ID_AD5439 }, - {"ad5443" ,ID_AD5443 }, - {"ad5449" ,ID_AD5449 }, + { .name ="ad5415" , .driver_data =ID_AD5449 }, + { .name ="ad5426" , .driver_data =ID_AD5426 }, + { .name ="ad5429" , .driver_data =ID_AD5429 }, + { .name ="ad5432" , .driver_data =ID_AD5432 }, + { .name ="ad5439" , .driver_data =ID_AD5439 }, + { .name ="ad5443" , .driver_data =ID_AD5443 }, + { .name ="ad5449" , .driver_data =ID_AD5449 }, { } };MODULE_DEVICE_TABLE (spi, ad5449_spi_ids);
drivers/iio/dac/ad5504.c +2 -2
@@ -319,8 +319,8 @@ static int ad5504_probe(struct spi_device *spi) }static const struct spi_device_id ad5504_id[] = { - {"ad5504" ,ID_AD5504 }, - {"ad5501" ,ID_AD5501 }, + { .name ="ad5504" , .driver_data =ID_AD5504 }, + { .name ="ad5501" , .driver_data =ID_AD5501 }, { } };MODULE_DEVICE_TABLE (spi, ad5504_id);
drivers/iio/dac/ad5624r_spi.c +6 -6
@@ -260,12 +260,12 @@ static int ad5624r_probe(struct spi_device *spi) }static const struct spi_device_id ad5624r_id[] = { - {"ad5624r3" ,ID_AD5624R3 }, - {"ad5644r3" ,ID_AD5644R3 }, - {"ad5664r3" ,ID_AD5664R3 }, - {"ad5624r5" ,ID_AD5624R5 }, - {"ad5644r5" ,ID_AD5644R5 }, - {"ad5664r5" ,ID_AD5664R5 }, + { .name ="ad5624r3" , .driver_data =ID_AD5624R3 }, + { .name ="ad5644r3" , .driver_data =ID_AD5644R3 }, + { .name ="ad5664r3" , .driver_data =ID_AD5664R3 }, + { .name ="ad5624r5" , .driver_data =ID_AD5624R5 }, + { .name ="ad5644r5" , .driver_data =ID_AD5644R5 }, + { .name ="ad5664r5" , .driver_data =ID_AD5664R5 }, { } };MODULE_DEVICE_TABLE (spi, ad5624r_id);
drivers/iio/dac/ad5706r.c +1 -1
@@ -233,7 +233,7 @@ static const struct of_device_id ad5706r_of_match[] = {MODULE_DEVICE_TABLE (of, ad5706r_of_match);static const struct spi_device_id ad5706r_id[] = { - {"ad5706r" }, + { .name ="ad5706r" }, { } };MODULE_DEVICE_TABLE (spi, ad5706r_id);
drivers/iio/dac/ad5755.c +5 -5
@@ -849,11 +849,11 @@ static int ad5755_probe(struct spi_device *spi) }static const struct spi_device_id ad5755_id[] = { - {"ad5755" , (kernel_ulong_t)&ad5755_chip_info_tbl[ID_AD5755 ] }, - {"ad5755-1" , (kernel_ulong_t)&ad5755_chip_info_tbl[ID_AD5755 ] }, - {"ad5757" , (kernel_ulong_t)&ad5755_chip_info_tbl[ID_AD5757 ] }, - {"ad5735" , (kernel_ulong_t)&ad5755_chip_info_tbl[ID_AD5735 ] }, - {"ad5737" , (kernel_ulong_t)&ad5755_chip_info_tbl[ID_AD5737 ] }, + { .name ="ad5755" , .driver_data = (kernel_ulong_t)&ad5755_chip_info_tbl[ID_AD5755 ] }, + { .name ="ad5755-1" , .driver_data = (kernel_ulong_t)&ad5755_chip_info_tbl[ID_AD5755 ] }, + { .name ="ad5757" , .driver_data = (kernel_ulong_t)&ad5755_chip_info_tbl[ID_AD5757 ] }, + { .name ="ad5735" , .driver_data = (kernel_ulong_t)&ad5755_chip_info_tbl[ID_AD5735 ] }, + { .name ="ad5737" , .driver_data = (kernel_ulong_t)&ad5755_chip_info_tbl[ID_AD5737 ] }, { } };MODULE_DEVICE_TABLE (spi, ad5755_id);
drivers/iio/dac/ad5761.c +4 -4
@@ -342,10 +342,10 @@ static int ad5761_probe(struct spi_device *spi) }static const struct spi_device_id ad5761_id[] = { - {"ad5721" ,ID_AD5721 }, - {"ad5721r" ,ID_AD5721R }, - {"ad5761" ,ID_AD5761 }, - {"ad5761r" ,ID_AD5761R }, + { .name ="ad5721" , .driver_data =ID_AD5721 }, + { .name ="ad5721r" , .driver_data =ID_AD5721R }, + { .name ="ad5761" , .driver_data =ID_AD5761 }, + { .name ="ad5761r" , .driver_data =ID_AD5761R }, { } };MODULE_DEVICE_TABLE (spi, ad5761_id);
drivers/iio/dac/ad5764.c +4 -4
@@ -342,10 +342,10 @@ static void ad5764_remove(struct spi_device *spi) }static const struct spi_device_id ad5764_ids[] = { - {"ad5744" ,ID_AD5744 }, - {"ad5744r" ,ID_AD5744R }, - {"ad5764" ,ID_AD5764 }, - {"ad5764r" ,ID_AD5764R }, + { .name ="ad5744" , .driver_data =ID_AD5744 }, + { .name ="ad5744r" , .driver_data =ID_AD5744R }, + { .name ="ad5764" , .driver_data =ID_AD5764 }, + { .name ="ad5764r" , .driver_data =ID_AD5764R }, { } };MODULE_DEVICE_TABLE (spi, ad5764_ids);
drivers/iio/dac/ad5766.c +2 -2
@@ -651,8 +651,8 @@ static const struct of_device_id ad5766_dt_match[] = {MODULE_DEVICE_TABLE (of, ad5766_dt_match);static const struct spi_device_id ad5766_spi_ids[] = { - {"ad5766" ,ID_AD5766 }, - {"ad5767" ,ID_AD5767 }, + { .name ="ad5766" , .driver_data =ID_AD5766 }, + { .name ="ad5767" , .driver_data =ID_AD5767 }, { } };MODULE_DEVICE_TABLE (spi, ad5766_spi_ids);
drivers/iio/dac/ad5791.c +5 -5
@@ -586,11 +586,11 @@ static const struct of_device_id ad5791_of_match[] = {MODULE_DEVICE_TABLE (of, ad5791_of_match);static const struct spi_device_id ad5791_id[] = { - {"ad5760" , (kernel_ulong_t)&ad5760_chip_info }, - {"ad5780" , (kernel_ulong_t)&ad5780_chip_info }, - {"ad5781" , (kernel_ulong_t)&ad5781_chip_info }, - {"ad5790" , (kernel_ulong_t)&ad5790_chip_info }, - {"ad5791" , (kernel_ulong_t)&ad5791_chip_info }, + { .name ="ad5760" , .driver_data = (kernel_ulong_t)&ad5760_chip_info }, + { .name ="ad5780" , .driver_data = (kernel_ulong_t)&ad5780_chip_info }, + { .name ="ad5781" , .driver_data = (kernel_ulong_t)&ad5781_chip_info }, + { .name ="ad5790" , .driver_data = (kernel_ulong_t)&ad5790_chip_info }, + { .name ="ad5791" , .driver_data = (kernel_ulong_t)&ad5791_chip_info }, { } };MODULE_DEVICE_TABLE (spi, ad5791_id);
drivers/iio/dac/ad8801.c +2 -2
@@ -151,8 +151,8 @@ static int ad8801_probe(struct spi_device *spi) }static const struct spi_device_id ad8801_ids[] = { - {"ad8801" ,ID_AD8801 }, - {"ad8803" ,ID_AD8803 }, + { .name ="ad8801" , .driver_data =ID_AD8801 }, + { .name ="ad8803" , .driver_data =ID_AD8803 }, { } };MODULE_DEVICE_TABLE (spi, ad8801_ids);
drivers/iio/dac/ad9739a.c +1 -1
@@ -447,7 +447,7 @@ static const struct of_device_id ad9739a_of_match[] = {MODULE_DEVICE_TABLE (of, ad9739a_of_match);static const struct spi_device_id ad9739a_id[] = { - {"ad9739a" }, + { .name ="ad9739a" }, { } };MODULE_DEVICE_TABLE (spi, ad9739a_id);
drivers/iio/dac/ltc1660.c +2 -2
@@ -224,8 +224,8 @@ static const struct of_device_id ltc1660_dt_ids[] = {MODULE_DEVICE_TABLE (of, ltc1660_dt_ids);static const struct spi_device_id ltc1660_id[] = { - {"ltc1660" ,ID_LTC1660 }, - {"ltc1665" ,ID_LTC1665 }, + { .name ="ltc1660" , .driver_data =ID_LTC1660 }, + { .name ="ltc1665" , .driver_data =ID_LTC1665 }, { } };MODULE_DEVICE_TABLE (spi, ltc1660_id);
drivers/iio/dac/ltc2632.c +22 -22
50 lines not on this page · raw message
drivers/iio/dac/ltc2664.c +2 -2
@@ -709,8 +709,8 @@ static int ltc2664_probe(struct spi_device *spi) }static const struct spi_device_id ltc2664_id[] = { - {"ltc2664" , (kernel_ulong_t)<c2664_chip }, - {"ltc2672" , (kernel_ulong_t)<c2672_chip }, + { .name ="ltc2664" , .driver_data = (kernel_ulong_t)<c2664_chip }, + { .name ="ltc2672" , .driver_data = (kernel_ulong_t)<c2672_chip }, { } };MODULE_DEVICE_TABLE (spi, ltc2664_id);
drivers/iio/dac/ltc2688.c +1 -1
@@ -992,7 +992,7 @@ static const struct of_device_id ltc2688_of_id[] = {MODULE_DEVICE_TABLE (of, ltc2688_of_id);static const struct spi_device_id ltc2688_id[] = { - {"ltc2688" }, + { .name ="ltc2688" }, { } };MODULE_DEVICE_TABLE (spi, ltc2688_id);
drivers/iio/dac/max22007.c +1 -1
@@ -465,7 +465,7 @@ static int max22007_probe(struct spi_device *spi) }static const struct spi_device_id max22007_id[] = { - {"max22007" }, + { .name ="max22007" }, { } };MODULE_DEVICE_TABLE (spi, max22007_id);
drivers/iio/dac/mcp4821.c +6 -6
@@ -298,12 +298,12 @@ static const struct of_device_id mcp4821_of_table[] = {MODULE_DEVICE_TABLE (of, mcp4821_of_table);static const struct spi_device_id mcp4821_id_table[] = { - {"mcp4801" , (kernel_ulong_t)&mcp4821_chip_info_table[ID_MCP4801 ]}, - {"mcp4802" , (kernel_ulong_t)&mcp4821_chip_info_table[ID_MCP4802 ]}, - {"mcp4811" , (kernel_ulong_t)&mcp4821_chip_info_table[ID_MCP4811 ]}, - {"mcp4812" , (kernel_ulong_t)&mcp4821_chip_info_table[ID_MCP4812 ]}, - {"mcp4821" , (kernel_ulong_t)&mcp4821_chip_info_table[ID_MCP4821 ]}, - {"mcp4822" , (kernel_ulong_t)&mcp4821_chip_info_table[ID_MCP4822 ]}, + { .name ="mcp4801" , .driver_data = (kernel_ulong_t)&mcp4821_chip_info_table[ID_MCP4801 ] }, + { .name ="mcp4802" , .driver_data = (kernel_ulong_t)&mcp4821_chip_info_table[ID_MCP4802 ] }, + { .name ="mcp4811" , .driver_data = (kernel_ulong_t)&mcp4821_chip_info_table[ID_MCP4811 ] }, + { .name ="mcp4812" , .driver_data = (kernel_ulong_t)&mcp4821_chip_info_table[ID_MCP4812 ] }, + { .name ="mcp4821" , .driver_data = (kernel_ulong_t)&mcp4821_chip_info_table[ID_MCP4821 ] }, + { .name ="mcp4822" , .driver_data = (kernel_ulong_t)&mcp4821_chip_info_table[ID_MCP4822 ] }, { } };MODULE_DEVICE_TABLE (spi, mcp4821_id_table);
drivers/iio/dac/mcp4922.c +4 -4
@@ -157,10 +157,10 @@ static int mcp4922_probe(struct spi_device *spi)static const struct spi_device_id mcp4922_id[] = { - {"mcp4902" ,ID_MCP4902 }, - {"mcp4912" ,ID_MCP4912 }, - {"mcp4921" ,ID_MCP4921 }, - {"mcp4922" ,ID_MCP4922 }, + { .name ="mcp4902" , .driver_data =ID_MCP4902 }, + { .name ="mcp4912" , .driver_data =ID_MCP4912 }, + { .name ="mcp4921" , .driver_data =ID_MCP4921 }, + { .name ="mcp4922" , .driver_data =ID_MCP4922 }, { } };MODULE_DEVICE_TABLE (spi, mcp4922_id);
drivers/iio/dac/rohm-bd79703.c +4 -4
@@ -214,10 +214,10 @@ static int bd79703_probe(struct spi_device *spi) }static const struct spi_device_id bd79703_id[] = { - {"bd79700" , (kernel_ulong_t)&bd79700_chip_data }, - {"bd79701" , (kernel_ulong_t)&bd79701_chip_data }, - {"bd79702" , (kernel_ulong_t)&bd79702_chip_data }, - {"bd79703" , (kernel_ulong_t)&bd79703_chip_data }, + { .name ="bd79700" , .driver_data = (kernel_ulong_t)&bd79700_chip_data }, + { .name ="bd79701" , .driver_data = (kernel_ulong_t)&bd79701_chip_data }, + { .name ="bd79702" , .driver_data = (kernel_ulong_t)&bd79702_chip_data }, + { .name ="bd79703" , .driver_data = (kernel_ulong_t)&bd79703_chip_data }, { } };MODULE_DEVICE_TABLE (spi, bd79703_id);
drivers/iio/dac/ti-dac082s085.c +6 -6
@@ -335,12 +335,12 @@ static const struct of_device_id ti_dac_of_id[] = {MODULE_DEVICE_TABLE (of, ti_dac_of_id);static const struct spi_device_id ti_dac_spi_id[] = { - {"dac082s085" , dual_8bit }, - {"dac102s085" , dual_10bit }, - {"dac122s085" , dual_12bit }, - {"dac084s085" , quad_8bit }, - {"dac104s085" , quad_10bit }, - {"dac124s085" , quad_12bit }, + { .name ="dac082s085" , .driver_data = dual_8bit }, + { .name ="dac102s085" , .driver_data = dual_10bit }, + { .name ="dac122s085" , .driver_data = dual_12bit }, + { .name ="dac084s085" , .driver_data = quad_8bit }, + { .name ="dac104s085" , .driver_data = quad_10bit }, + { .name ="dac124s085" , .driver_data = quad_12bit }, { } };MODULE_DEVICE_TABLE (spi, ti_dac_spi_id);
drivers/iio/dac/ti-dac7311.c +3 -3
@@ -311,9 +311,9 @@ static const struct of_device_id ti_dac_of_id[] = {MODULE_DEVICE_TABLE (of, ti_dac_of_id);static const struct spi_device_id ti_dac_spi_id[] = { - {"dac5311" ,ID_DAC5311 }, - {"dac6311" ,ID_DAC6311 }, - {"dac7311" ,ID_DAC7311 }, + { .name ="dac5311" , .driver_data =ID_DAC5311 }, + { .name ="dac6311" , .driver_data =ID_DAC6311 }, + { .name ="dac7311" , .driver_data =ID_DAC7311 }, { } };MODULE_DEVICE_TABLE (spi, ti_dac_spi_id);
drivers/iio/dac/ti-dac7612.c +1 -1
@@ -165,7 +165,7 @@ static int dac7612_probe(struct spi_device *spi) }static const struct spi_device_id dac7612_id[] = { - {"ti-dac7612" }, + { .name ="ti-dac7612" }, { } };MODULE_DEVICE_TABLE (spi, dac7612_id);
drivers/iio/frequency/adf4350.c +2 -2
@@ -692,8 +692,8 @@ static const struct of_device_id adf4350_of_match[] = {MODULE_DEVICE_TABLE (of, adf4350_of_match);static const struct spi_device_id adf4350_id[] = { - {"adf4350" ,4350 }, - {"adf4351" ,4351 }, + { .name ="adf4350" , .driver_data =4350 }, + { .name ="adf4351" , .driver_data =4351 }, { } };MODULE_DEVICE_TABLE (spi, adf4350_id);
drivers/iio/frequency/adf4371.c +2 -2
@@ -624,8 +624,8 @@ static int adf4371_probe(struct spi_device *spi) }static const struct spi_device_id adf4371_id_table[] = { - {"adf4371" , (kernel_ulong_t)&adf4371_chip_info }, - {"adf4372" , (kernel_ulong_t)&adf4372_chip_info }, + { .name ="adf4371" , .driver_data = (kernel_ulong_t)&adf4371_chip_info }, + { .name ="adf4372" , .driver_data = (kernel_ulong_t)&adf4372_chip_info }, { } };MODULE_DEVICE_TABLE (spi, adf4371_id_table);
drivers/iio/frequency/adf4377.c +2 -2
@@ -1097,8 +1097,8 @@ static int adf4377_probe(struct spi_device *spi) }static const struct spi_device_id adf4377_id[] = { - {"adf4377" , (kernel_ulong_t)&adf4377_chip_info }, - {"adf4378" , (kernel_ulong_t)&adf4378_chip_info }, + { .name ="adf4377" , .driver_data = (kernel_ulong_t)&adf4377_chip_info }, + { .name ="adf4378" , .driver_data = (kernel_ulong_t)&adf4378_chip_info }, { } };MODULE_DEVICE_TABLE (spi, adf4377_id);
drivers/iio/gyro/adis16080.c +2 -2
@@ -212,8 +212,8 @@ static int adis16080_probe(struct spi_device *spi) }static const struct spi_device_id adis16080_ids[] = { - {"adis16080" ,ID_ADIS16080 }, - {"adis16100" ,ID_ADIS16100 }, + { .name ="adis16080" , .driver_data =ID_ADIS16080 }, + { .name ="adis16100" , .driver_data =ID_ADIS16100 }, { } };MODULE_DEVICE_TABLE (spi, adis16080_ids);
drivers/iio/gyro/adis16136.c +4 -4
@@ -563,10 +563,10 @@ static int adis16136_probe(struct spi_device *spi) }static const struct spi_device_id adis16136_ids[] = { - {"adis16133" ,ID_ADIS16133 }, - {"adis16135" ,ID_ADIS16135 }, - {"adis16136" ,ID_ADIS16136 }, - {"adis16137" ,ID_ADIS16137 }, + { .name ="adis16133" , .driver_data =ID_ADIS16133 }, + { .name ="adis16135" , .driver_data =ID_ADIS16135 }, + { .name ="adis16136" , .driver_data =ID_ADIS16136 }, + { .name ="adis16137" , .driver_data =ID_ADIS16137 }, { } };MODULE_DEVICE_TABLE (spi, adis16136_ids);
drivers/iio/gyro/adis16260.c +6 -6
@@ -411,12 +411,12 @@ static int adis16260_probe(struct spi_device *spi)* support for the on chip filtering. */ static const struct spi_device_id adis16260_id[] = { - {"adis16260" ,ADIS16260 }, - {"adis16265" ,ADIS16260 }, - {"adis16266" ,ADIS16266 }, - {"adis16250" ,ADIS16260 }, - {"adis16255" ,ADIS16260 }, - {"adis16251" ,ADIS16251 }, + { .name ="adis16260" , .driver_data =ADIS16260 }, + { .name ="adis16265" , .driver_data =ADIS16260 }, + { .name ="adis16266" , .driver_data =ADIS16266 }, + { .name ="adis16250" , .driver_data =ADIS16260 }, + { .name ="adis16255" , .driver_data =ADIS16260 }, + { .name ="adis16251" , .driver_data =ADIS16251 }, { } };MODULE_DEVICE_TABLE (spi, adis16260_id);
drivers/iio/gyro/adxrs450.c +2 -2
@@ -439,8 +439,8 @@ static int adxrs450_probe(struct spi_device *spi) }static const struct spi_device_id adxrs450_id[] = { - {"adxrs450" ,ID_ADXRS450 }, - {"adxrs453" ,ID_ADXRS453 }, + { .name ="adxrs450" , .driver_data =ID_ADXRS450 }, + { .name ="adxrs453" , .driver_data =ID_ADXRS453 }, { } };MODULE_DEVICE_TABLE (spi, adxrs450_id);
drivers/iio/gyro/st_gyro_spi.c +9 -9
@@ -98,15 +98,15 @@ static int st_gyro_spi_probe(struct spi_device *spi) }static const struct spi_device_id st_gyro_id_table[] = { - {L3G4200D_GYRO_DEV_NAME }, - {LSM330D_GYRO_DEV_NAME }, - {LSM330DL_GYRO_DEV_NAME }, - {LSM330DLC_GYRO_DEV_NAME }, - {L3GD20_GYRO_DEV_NAME }, - {L3GD20H_GYRO_DEV_NAME }, - {L3G4IS_GYRO_DEV_NAME }, - {LSM330_GYRO_DEV_NAME }, - {LSM9DS0_GYRO_DEV_NAME }, + { .name =L3G4200D_GYRO_DEV_NAME }, + { .name =LSM330D_GYRO_DEV_NAME }, + { .name =LSM330DL_GYRO_DEV_NAME }, + { .name =LSM330DLC_GYRO_DEV_NAME }, + { .name =L3GD20_GYRO_DEV_NAME }, + { .name =L3GD20H_GYRO_DEV_NAME }, + { .name =L3G4IS_GYRO_DEV_NAME }, + { .name =LSM330_GYRO_DEV_NAME }, + { .name =LSM9DS0_GYRO_DEV_NAME }, { } };MODULE_DEVICE_TABLE (spi, st_gyro_id_table);
drivers/iio/humidity/hts221_spi.c +1 -1
@@ -47,7 +47,7 @@ static const struct of_device_id hts221_spi_of_match[] = {MODULE_DEVICE_TABLE (of, hts221_spi_of_match);static const struct spi_device_id hts221_spi_id_table[] = { - {HTS221_DEV_NAME }, + { .name =HTS221_DEV_NAME }, { } };MODULE_DEVICE_TABLE (spi, hts221_spi_id_table);
drivers/iio/imu/adis16400.c +15 -15
@@ -1189,21 +1189,21 @@ static int adis16400_probe(struct spi_device *spi) }static const struct spi_device_id adis16400_id[] = { - {"adis16300" , (kernel_ulong_t)&adis16300_chip_info }, - {"adis16305" , (kernel_ulong_t)&adis16300_chip_info }, - {"adis16334" , (kernel_ulong_t)&adis16334_chip_info }, - {"adis16350" , (kernel_ulong_t)&adis16350_chip_info }, - {"adis16354" , (kernel_ulong_t)&adis16350_chip_info }, - {"adis16355" , (kernel_ulong_t)&adis16350_chip_info }, - {"adis16360" , (kernel_ulong_t)&adis16360_chip_info }, - {"adis16362" , (kernel_ulong_t)&adis16362_chip_info }, - {"adis16364" , (kernel_ulong_t)&adis16364_chip_info }, - {"adis16365" , (kernel_ulong_t)&adis16360_chip_info }, - {"adis16367" , (kernel_ulong_t)&adis16367_chip_info }, - {"adis16400" , (kernel_ulong_t)&adis16400_chip_info }, - {"adis16405" , (kernel_ulong_t)&adis16400_chip_info }, - {"adis16445" , (kernel_ulong_t)&adis16445_chip_info }, - {"adis16448" , (kernel_ulong_t)&adis16448_chip_info }, + { .name ="adis16300" , .driver_data = (kernel_ulong_t)&adis16300_chip_info }, + { .name ="adis16305" , .driver_data = (kernel_ulong_t)&adis16300_chip_info }, + { .name ="adis16334" , .driver_data = (kernel_ulong_t)&adis16334_chip_info }, + { .name ="adis16350" , .driver_data = (kernel_ulong_t)&adis16350_chip_info }, + { .name ="adis16354" , .driver_data = (kernel_ulong_t)&adis16350_chip_info }, + { .name ="adis16355" , .driver_data = (kernel_ulong_t)&adis16350_chip_info }, + { .name ="adis16360" , .driver_data = (kernel_ulong_t)&adis16360_chip_info }, + { .name ="adis16362" , .driver_data = (kernel_ulong_t)&adis16362_chip_info }, + { .name ="adis16364" , .driver_data = (kernel_ulong_t)&adis16364_chip_info }, + { .name ="adis16365" , .driver_data = (kernel_ulong_t)&adis16360_chip_info }, + { .name ="adis16367" , .driver_data = (kernel_ulong_t)&adis16367_chip_info }, + { .name ="adis16400" , .driver_data = (kernel_ulong_t)&adis16400_chip_info }, + { .name ="adis16405" , .driver_data = (kernel_ulong_t)&adis16400_chip_info }, + { .name ="adis16445" , .driver_data = (kernel_ulong_t)&adis16445_chip_info }, + { .name ="adis16448" , .driver_data = (kernel_ulong_t)&adis16448_chip_info }, { } };MODULE_DEVICE_TABLE (spi, adis16400_id);
drivers/iio/imu/adis16475.c +27 -27
60 lines not on this page · raw message
drivers/iio/imu/adis16480.c +20 -20
@@ -1807,26 +1807,26 @@ static int adis16480_probe(struct spi_device *spi) }static const struct spi_device_id adis16480_ids[] = { - {"adis16375" ,ADIS16375 }, - {"adis16480" ,ADIS16480 }, - {"adis16485" ,ADIS16485 }, - {"adis16486" ,ADIS16486 }, - {"adis16487" ,ADIS16487 }, - {"adis16488" ,ADIS16488 }, - {"adis16489" ,ADIS16489 }, - {"adis16490" ,ADIS16490 }, - {"adis16495-1" ,ADIS16495_1 }, - {"adis16495-2" ,ADIS16495_2 }, - {"adis16495-3" ,ADIS16495_3 }, - {"adis16497-1" ,ADIS16497_1 }, - {"adis16497-2" ,ADIS16497_2 }, - {"adis16497-3" ,ADIS16497_3 }, - {"adis16545-1" ,ADIS16545_1 }, - {"adis16545-2" ,ADIS16545_2 }, - {"adis16545-3" ,ADIS16545_3 }, - {"adis16547-1" ,ADIS16547_1 }, - {"adis16547-2" ,ADIS16547_2 }, - {"adis16547-3" ,ADIS16547_3 }, + { .name ="adis16375" , .driver_data =ADIS16375 }, + { .name ="adis16480" , .driver_data =ADIS16480 }, + { .name ="adis16485" , .driver_data =ADIS16485 }, + { .name ="adis16486" , .driver_data =ADIS16486 }, + { .name ="adis16487" , .driver_data =ADIS16487 }, + { .name ="adis16488" , .driver_data =ADIS16488 }, + { .name ="adis16489" , .driver_data =ADIS16489 }, + { .name ="adis16490" , .driver_data =ADIS16490 }, + { .name ="adis16495-1" , .driver_data =ADIS16495_1 }, + { .name ="adis16495-2" , .driver_data =ADIS16495_2 }, + { .name ="adis16495-3" , .driver_data =ADIS16495_3 }, + { .name ="adis16497-1" , .driver_data =ADIS16497_1 }, + { .name ="adis16497-2" , .driver_data =ADIS16497_2 }, + { .name ="adis16497-3" , .driver_data =ADIS16497_3 }, + { .name ="adis16545-1" , .driver_data =ADIS16545_1 }, + { .name ="adis16545-2" , .driver_data =ADIS16545_2 }, + { .name ="adis16545-3" , .driver_data =ADIS16545_3 }, + { .name ="adis16547-1" , .driver_data =ADIS16547_1 }, + { .name ="adis16547-2" , .driver_data =ADIS16547_2 }, + { .name ="adis16547-3" , .driver_data =ADIS16547_3 }, { } };MODULE_DEVICE_TABLE (spi, adis16480_ids);
drivers/iio/imu/bmi270/bmi270_spi.c +2 -2
@@ -66,8 +66,8 @@ static int bmi270_spi_probe(struct spi_device *spi) }static const struct spi_device_id bmi270_spi_id[] = { - {"bmi260" , (kernel_ulong_t)&bmi260_chip_info }, - {"bmi270" , (kernel_ulong_t)&bmi270_chip_info }, + { .name ="bmi260" , .driver_data = (kernel_ulong_t)&bmi260_chip_info }, + { .name ="bmi270" , .driver_data = (kernel_ulong_t)&bmi270_chip_info }, { } };
drivers/iio/imu/bmi323/bmi323_spi.c +1 -1
@@ -65,7 +65,7 @@ static int bmi323_spi_probe(struct spi_device *spi) }static const struct spi_device_id bmi323_spi_ids[] = { - {"bmi323" }, + { .name ="bmi323" }, { } };MODULE_DEVICE_TABLE (spi, bmi323_spi_ids);
drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c +7 -7
@@ -72,13 +72,13 @@ static int inv_icm42600_probe(struct spi_device *spi)* supported by this driver */ static const struct spi_device_id inv_icm42600_id[] = { - {"icm42600" ,INV_CHIP_ICM42600 }, - {"icm42602" ,INV_CHIP_ICM42602 }, - {"icm42605" ,INV_CHIP_ICM42605 }, - {"icm42686" ,INV_CHIP_ICM42686 }, - {"icm42622" ,INV_CHIP_ICM42622 }, - {"icm42688" ,INV_CHIP_ICM42688 }, - {"icm42631" ,INV_CHIP_ICM42631 }, + { .name ="icm42600" , .driver_data =INV_CHIP_ICM42600 }, + { .name ="icm42602" , .driver_data =INV_CHIP_ICM42602 }, + { .name ="icm42605" , .driver_data =INV_CHIP_ICM42605 }, + { .name ="icm42686" , .driver_data =INV_CHIP_ICM42686 }, + { .name ="icm42622" , .driver_data =INV_CHIP_ICM42622 }, + { .name ="icm42688" , .driver_data =INV_CHIP_ICM42688 }, + { .name ="icm42631" , .driver_data =INV_CHIP_ICM42631 }, { } };MODULE_DEVICE_TABLE (spi, inv_icm42600_id);
drivers/iio/imu/inv_icm45600/inv_icm45600_spi.c +8 -8
@@ -49,14 +49,14 @@ static int inv_icm45600_probe(struct spi_device *spi)* supported by this driver. */ static const struct spi_device_id inv_icm45600_id[] = { - {"icm45605" , (kernel_ulong_t)&inv_icm45605_chip_info }, - {"icm45606" , (kernel_ulong_t)&inv_icm45606_chip_info }, - {"icm45608" , (kernel_ulong_t)&inv_icm45608_chip_info }, - {"icm45634" , (kernel_ulong_t)&inv_icm45634_chip_info }, - {"icm45686" , (kernel_ulong_t)&inv_icm45686_chip_info }, - {"icm45687" , (kernel_ulong_t)&inv_icm45687_chip_info }, - {"icm45688p" , (kernel_ulong_t)&inv_icm45688p_chip_info }, - {"icm45689" , (kernel_ulong_t)&inv_icm45689_chip_info }, + { .name ="icm45605" , .driver_data = (kernel_ulong_t)&inv_icm45605_chip_info }, + { .name ="icm45606" , .driver_data = (kernel_ulong_t)&inv_icm45606_chip_info }, + { .name ="icm45608" , .driver_data = (kernel_ulong_t)&inv_icm45608_chip_info }, + { .name ="icm45634" , .driver_data = (kernel_ulong_t)&inv_icm45634_chip_info }, + { .name ="icm45686" , .driver_data = (kernel_ulong_t)&inv_icm45686_chip_info }, + { .name ="icm45687" , .driver_data = (kernel_ulong_t)&inv_icm45687_chip_info }, + { .name ="icm45688p" , .driver_data = (kernel_ulong_t)&inv_icm45688p_chip_info }, + { .name ="icm45689" , .driver_data = (kernel_ulong_t)&inv_icm45689_chip_info }, { } };MODULE_DEVICE_TABLE (spi, inv_icm45600_id);
drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c +17 -17
@@ -66,23 +66,23 @@ static int inv_mpu_probe(struct spi_device *spi)* supported by this driver */ static const struct spi_device_id inv_mpu_id[] = { - {"mpu6000" ,INV_MPU6000 }, - {"mpu6500" ,INV_MPU6500 }, - {"mpu6515" ,INV_MPU6515 }, - {"mpu6880" ,INV_MPU6880 }, - {"mpu9250" ,INV_MPU9250 }, - {"mpu9255" ,INV_MPU9255 }, - {"icm20608" ,INV_ICM20608 }, - {"icm20608d" ,INV_ICM20608D }, - {"icm20609" ,INV_ICM20609 }, - {"icm20689" ,INV_ICM20689 }, - {"icm20600" ,INV_ICM20600 }, - {"icm20602" ,INV_ICM20602 }, - {"icm20690" ,INV_ICM20690 }, - {"iam20380" ,INV_IAM20380 }, - {"iam20680" ,INV_IAM20680 }, - {"iam20680hp" ,INV_IAM20680HP }, - {"iam20680ht" ,INV_IAM20680HT }, + { .name ="mpu6000" , .driver_data =INV_MPU6000 }, + { .name ="mpu6500" , .driver_data =INV_MPU6500 }, + { .name ="mpu6515" , .driver_data =INV_MPU6515 }, + { .name ="mpu6880" , .driver_data =INV_MPU6880 }, + { .name ="mpu9250" , .driver_data =INV_MPU9250 }, + { .name ="mpu9255" , .driver_data =INV_MPU9255 }, + { .name ="icm20608" , .driver_data =INV_ICM20608 }, + { .name ="icm20608d" , .driver_data =INV_ICM20608D }, + { .name ="icm20609" , .driver_data =INV_ICM20609 }, + { .name ="icm20689" , .driver_data =INV_ICM20689 }, + { .name ="icm20600" , .driver_data =INV_ICM20600 }, + { .name ="icm20602" , .driver_data =INV_ICM20602 }, + { .name ="icm20690" , .driver_data =INV_ICM20690 }, + { .name ="iam20380" , .driver_data =INV_IAM20380 }, + { .name ="iam20680" , .driver_data =INV_IAM20680 }, + { .name ="iam20680hp" , .driver_data =INV_IAM20680HP }, + { .name ="iam20680ht" , .driver_data =INV_IAM20680HT }, { } };
drivers/iio/imu/smi240.c +1 -1
@@ -593,7 +593,7 @@ static int smi240_probe(struct spi_device *spi) }static const struct spi_device_id smi240_spi_id[] = { - {"smi240" }, + { .name ="smi240" }, { } };MODULE_DEVICE_TABLE (spi, smi240_spi_id);
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c +24 -24
54 lines not on this page · raw message
drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c +2 -2
@@ -33,8 +33,8 @@ static const struct of_device_id st_lsm9ds0_of_match[] = {MODULE_DEVICE_TABLE (of, st_lsm9ds0_of_match);static const struct spi_device_id st_lsm9ds0_id_table[] = { - {LSM303D_IMU_DEV_NAME }, - {LSM9DS0_IMU_DEV_NAME }, + { .name =LSM303D_IMU_DEV_NAME }, + { .name =LSM9DS0_IMU_DEV_NAME }, { } };MODULE_DEVICE_TABLE (spi, st_lsm9ds0_id_table);
drivers/iio/light/st_uvis25_spi.c +1 -1
@@ -47,7 +47,7 @@ static const struct of_device_id st_uvis25_spi_of_match[] = {MODULE_DEVICE_TABLE (of, st_uvis25_spi_of_match);static const struct spi_device_id st_uvis25_spi_id_table[] = { - {ST_UVIS25_DEV_NAME }, + { .name =ST_UVIS25_DEV_NAME }, { } };MODULE_DEVICE_TABLE (spi, st_uvis25_spi_id_table);
drivers/iio/magnetometer/st_magn_spi.c +6 -6
@@ -88,12 +88,12 @@ static int st_magn_spi_probe(struct spi_device *spi) }static const struct spi_device_id st_magn_id_table[] = { - {LIS3MDL_MAGN_DEV_NAME }, - {LSM303AGR_MAGN_DEV_NAME }, - {LIS2MDL_MAGN_DEV_NAME }, - {LSM9DS1_MAGN_DEV_NAME }, - {IIS2MDC_MAGN_DEV_NAME }, - {LSM303C_MAGN_DEV_NAME }, + { .name =LIS3MDL_MAGN_DEV_NAME }, + { .name =LSM303AGR_MAGN_DEV_NAME }, + { .name =LIS2MDL_MAGN_DEV_NAME }, + { .name =LSM9DS1_MAGN_DEV_NAME }, + { .name =IIS2MDC_MAGN_DEV_NAME }, + { .name =LSM303C_MAGN_DEV_NAME }, { } };MODULE_DEVICE_TABLE (spi, st_magn_id_table);
drivers/iio/potentiometer/max5481.c +4 -4
@@ -170,10 +170,10 @@ static int max5481_probe(struct spi_device *spi) }static const struct spi_device_id max5481_id_table[] = { - {"max5481" , max5481 }, - {"max5482" , max5482 }, - {"max5483" , max5483 }, - {"max5484" , max5484 }, + { .name ="max5481" , .driver_data = max5481 }, + { .name ="max5482" , .driver_data = max5482 }, + { .name ="max5483" , .driver_data = max5483 }, + { .name ="max5484" , .driver_data = max5484 }, { } };MODULE_DEVICE_TABLE (spi, max5481_id_table);
drivers/iio/potentiometer/max5487.c +3 -3
@@ -126,9 +126,9 @@ static void max5487_spi_remove(struct spi_device *spi) }static const struct spi_device_id max5487_id[] = { - {"MAX5487" ,10 }, - {"MAX5488" ,50 }, - {"MAX5489" ,100 }, + { .name ="MAX5487" , .driver_data =10 }, + { .name ="MAX5488" , .driver_data =50 }, + { .name ="MAX5489" , .driver_data =100 }, { } };MODULE_DEVICE_TABLE (spi, max5487_id);
drivers/iio/potentiometer/mcp41010.c +6 -6
@@ -176,12 +176,12 @@ static const struct of_device_id mcp41010_match[] = {MODULE_DEVICE_TABLE (of, mcp41010_match);static const struct spi_device_id mcp41010_id[] = { - {"mcp41010" ,MCP41010 }, - {"mcp41050" ,MCP41050 }, - {"mcp41100" ,MCP41100 }, - {"mcp42010" ,MCP42010 }, - {"mcp42050" ,MCP42050 }, - {"mcp42100" ,MCP42100 }, + { .name ="mcp41010" , .driver_data =MCP41010 }, + { .name ="mcp41050" , .driver_data =MCP41050 }, + { .name ="mcp41100" , .driver_data =MCP41100 }, + { .name ="mcp42010" , .driver_data =MCP42010 }, + { .name ="mcp42050" , .driver_data =MCP42050 }, + { .name ="mcp42100" , .driver_data =MCP42100 }, { } };MODULE_DEVICE_TABLE (spi, mcp41010_id);
drivers/iio/potentiometer/mcp4131.c +64 -64
134 lines not on this page · raw message
drivers/iio/potentiometer/x9250.c +2 -2
@@ -198,8 +198,8 @@ static const struct of_device_id x9250_of_match[] = {MODULE_DEVICE_TABLE (of, x9250_of_match);static const struct spi_device_id x9250_id_table[] = { - {"x9250t" , (kernel_ulong_t)&x9250_cfg[X9250T ] }, - {"x9250u" , (kernel_ulong_t)&x9250_cfg[X9250U ] }, + { .name ="x9250t" , .driver_data = (kernel_ulong_t)&x9250_cfg[X9250T ] }, + { .name ="x9250u" , .driver_data = (kernel_ulong_t)&x9250_cfg[X9250U ] }, { } };MODULE_DEVICE_TABLE (spi, x9250_id_table);
drivers/iio/pressure/abp2030pa_spi.c +1 -1
@@ -46,7 +46,7 @@ static const struct of_device_id abp2_spi_match[] = {MODULE_DEVICE_TABLE (of, abp2_spi_match);static const struct spi_device_id abp2_spi_id[] = { - {"abp2030pa" }, + { .name ="abp2030pa" }, { } };MODULE_DEVICE_TABLE (spi, abp2_spi_id);
drivers/iio/pressure/bmp280-spi.c +7 -7
@@ -118,13 +118,13 @@ static const struct of_device_id bmp280_of_spi_match[] = {MODULE_DEVICE_TABLE (of, bmp280_of_spi_match);static const struct spi_device_id bmp280_spi_id[] = { - {"bmp085" , (kernel_ulong_t)&bmp085_chip_info }, - {"bmp180" , (kernel_ulong_t)&bmp180_chip_info }, - {"bmp181" , (kernel_ulong_t)&bmp180_chip_info }, - {"bmp280" , (kernel_ulong_t)&bmp280_chip_info }, - {"bme280" , (kernel_ulong_t)&bme280_chip_info }, - {"bmp380" , (kernel_ulong_t)&bmp380_chip_info }, - {"bmp580" , (kernel_ulong_t)&bmp580_chip_info }, + { .name ="bmp085" , .driver_data = (kernel_ulong_t)&bmp085_chip_info }, + { .name ="bmp180" , .driver_data = (kernel_ulong_t)&bmp180_chip_info }, + { .name ="bmp181" , .driver_data = (kernel_ulong_t)&bmp180_chip_info }, + { .name ="bmp280" , .driver_data = (kernel_ulong_t)&bmp280_chip_info }, + { .name ="bme280" , .driver_data = (kernel_ulong_t)&bme280_chip_info }, + { .name ="bmp380" , .driver_data = (kernel_ulong_t)&bmp380_chip_info }, + { .name ="bmp580" , .driver_data = (kernel_ulong_t)&bmp580_chip_info }, { } };MODULE_DEVICE_TABLE (spi, bmp280_spi_id);
drivers/iio/pressure/hsc030pa_spi.c +1 -1
@@ -40,7 +40,7 @@ static const struct of_device_id hsc_spi_match[] = {MODULE_DEVICE_TABLE (of, hsc_spi_match);static const struct spi_device_id hsc_spi_id[] = { - {"hsc030pa" }, + { .name ="hsc030pa" }, { } };MODULE_DEVICE_TABLE (spi, hsc_spi_id);
drivers/iio/pressure/mprls0025pa_spi.c +1 -1
@@ -60,7 +60,7 @@ static const struct of_device_id mpr_spi_match[] = {MODULE_DEVICE_TABLE (of, mpr_spi_match);static const struct spi_device_id mpr_spi_id[] = { - {"mprls0025pa" }, + { .name ="mprls0025pa" }, { } };MODULE_DEVICE_TABLE (spi, mpr_spi_id);
drivers/iio/pressure/ms5611_spi.c +2 -2
@@ -114,8 +114,8 @@ static const struct of_device_id ms5611_spi_matches[] = {MODULE_DEVICE_TABLE (of, ms5611_spi_matches);static const struct spi_device_id ms5611_id[] = { - {"ms5611" ,MS5611 }, - {"ms5607" ,MS5607 }, + { .name ="ms5611" , .driver_data =MS5611 }, + { .name ="ms5607" , .driver_data =MS5607 }, { } };MODULE_DEVICE_TABLE (spi, ms5611_id);
drivers/iio/pressure/st_pressure_spi.c +12 -12
@@ -94,18 +94,18 @@ static int st_press_spi_probe(struct spi_device *spi) }static const struct spi_device_id st_press_id_table[] = { - {LPS001WP_PRESS_DEV_NAME }, - {LPS25H_PRESS_DEV_NAME }, - {LPS331AP_PRESS_DEV_NAME }, - {LPS22HB_PRESS_DEV_NAME }, - {LPS33HW_PRESS_DEV_NAME }, - {LPS35HW_PRESS_DEV_NAME }, - {LPS22HH_PRESS_DEV_NAME }, - {LPS22DF_PRESS_DEV_NAME }, - {"lps001wp-press" }, - {"lps25h-press" , }, - {"lps331ap-press" }, - {"lps22hb-press" }, + { .name =LPS001WP_PRESS_DEV_NAME }, + { .name =LPS25H_PRESS_DEV_NAME }, + { .name =LPS331AP_PRESS_DEV_NAME }, + { .name =LPS22HB_PRESS_DEV_NAME }, + { .name =LPS33HW_PRESS_DEV_NAME }, + { .name =LPS35HW_PRESS_DEV_NAME }, + { .name =LPS22HH_PRESS_DEV_NAME }, + { .name =LPS22DF_PRESS_DEV_NAME }, + { .name ="lps001wp-press" }, + { .name ="lps25h-press" }, + { .name ="lps331ap-press" }, + { .name ="lps22hb-press" }, { } };MODULE_DEVICE_TABLE (spi, st_press_id_table);
drivers/iio/resolver/ad2s1200.c +2 -2
@@ -183,8 +183,8 @@ static const struct of_device_id ad2s1200_of_match[] = {MODULE_DEVICE_TABLE (of, ad2s1200_of_match);static const struct spi_device_id ad2s1200_id[] = { - {"ad2s1200" }, - {"ad2s1205" }, + { .name ="ad2s1200" }, + { .name ="ad2s1205" }, { } };MODULE_DEVICE_TABLE (spi, ad2s1200_id);
drivers/iio/resolver/ad2s1210.c +1 -1
@@ -1597,7 +1597,7 @@ static const struct of_device_id ad2s1210_of_match[] = {MODULE_DEVICE_TABLE (of, ad2s1210_of_match);static const struct spi_device_id ad2s1210_id[] = { - {"ad2s1210" }, + { .name ="ad2s1210" }, { } };MODULE_DEVICE_TABLE (spi, ad2s1210_id);
drivers/iio/resolver/ad2s90.c +1 -1
@@ -110,7 +110,7 @@ static const struct of_device_id ad2s90_of_match[] = {MODULE_DEVICE_TABLE (of, ad2s90_of_match);static const struct spi_device_id ad2s90_id[] = { - {"ad2s90" }, + { .name ="ad2s90" }, { } };MODULE_DEVICE_TABLE (spi, ad2s90_id);
drivers/iio/temperature/ltc2983.c +5 -5
@@ -2071,11 +2071,11 @@ static const struct ltc2983_chip_info ltm2985_chip_info_data = { };static const struct spi_device_id ltc2983_id_table[] = { - {"adt7604" , (kernel_ulong_t)&adt7604_chip_info_data }, - {"ltc2983" , (kernel_ulong_t)<c2983_chip_info_data }, - {"ltc2984" , (kernel_ulong_t)<c2984_chip_info_data }, - {"ltc2986" , (kernel_ulong_t)<c2986_chip_info_data }, - {"ltm2985" , (kernel_ulong_t)<m2985_chip_info_data }, + { .name ="adt7604" , .driver_data = (kernel_ulong_t)&adt7604_chip_info_data }, + { .name ="ltc2983" , .driver_data = (kernel_ulong_t)<c2983_chip_info_data }, + { .name ="ltc2984" , .driver_data = (kernel_ulong_t)<c2984_chip_info_data }, + { .name ="ltc2986" , .driver_data = (kernel_ulong_t)<c2986_chip_info_data }, + { .name ="ltm2985" , .driver_data = (kernel_ulong_t)<m2985_chip_info_data }, { } };MODULE_DEVICE_TABLE (spi, ltc2983_id_table);
drivers/iio/temperature/maxim_thermocouple.c +9 -9
@@ -263,15 +263,15 @@ static int maxim_thermocouple_probe(struct spi_device *spi) }static const struct spi_device_id maxim_thermocouple_id[] = { - {"max6675" ,MAX6675 }, - {"max31855" ,MAX31855 }, - {"max31855k" ,MAX31855K }, - {"max31855j" ,MAX31855J }, - {"max31855n" ,MAX31855N }, - {"max31855s" ,MAX31855S }, - {"max31855t" ,MAX31855T }, - {"max31855e" ,MAX31855E }, - {"max31855r" ,MAX31855R }, + { .name ="max6675" , .driver_data =MAX6675 }, + { .name ="max31855" , .driver_data =MAX31855 }, + { .name ="max31855k" , .driver_data =MAX31855K }, + { .name ="max31855j" , .driver_data =MAX31855J }, + { .name ="max31855n" , .driver_data =MAX31855N }, + { .name ="max31855s" , .driver_data =MAX31855S }, + { .name ="max31855t" , .driver_data =MAX31855T }, + { .name ="max31855e" , .driver_data =MAX31855E }, + { .name ="max31855r" , .driver_data =MAX31855R }, { } };MODULE_DEVICE_TABLE (spi, maxim_thermocouple_id);
Signature · 1 line
2.47.3
PATCH 12/13 staging: iio: Drop unused assignment of spi_device_id driver data
In reply to Uwe Kleine-König (The Capable Hub)The drivers explicitly set the .driver_data member of struct spi_device_id to zero without relying on that value. Drop these unused assignments.
While touching these arrays use named initializers for .name.
This patch doesn't modify the compiled arrays, only their representation in source form benefits. The former was confirmed with x86 and arm64 builds.
--- drivers/staging/iio/addac/adt7316-spi.c | 13 ++++++------- drivers/staging/iio/frequency/ad9832.c | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-)
drivers/staging/iio/addac/adt7316-spi.c +6 -7
@@ -126,15 +126,14 @@ static int adt7316_spi_probe(struct spi_device *spi_dev) }static const struct spi_device_id adt7316_spi_id[] = { - {"adt7316" ,0 }, - {"adt7317" ,0 }, - {"adt7318" ,0 }, - {"adt7516" ,0 }, - {"adt7517" ,0 }, - {"adt7519" ,0 }, + { .name ="adt7316" }, + { .name ="adt7317" }, + { .name ="adt7318" }, + { .name ="adt7516" }, + { .name ="adt7517" }, + { .name ="adt7519" }, { } }; -MODULE_DEVICE_TABLE (spi, adt7316_spi_id);static const struct of_device_id adt7316_of_spi_match[] = {
drivers/staging/iio/frequency/ad9832.c +2 -2
@@ -381,8 +381,8 @@ static const struct of_device_id ad9832_of_match[] = {MODULE_DEVICE_TABLE (of, ad9832_of_match);static const struct spi_device_id ad9832_id[] = { - {"ad9832" ,0 }, - {"ad9835" ,0 }, + { .name ="ad9832" }, + { .name ="ad9835" }, { } };MODULE_DEVICE_TABLE (spi, ad9832_id);
Signature · 1 line
2.47.3
PATCH 13/13 staging: iio: Initialize spi_device_id arrays using member names
In reply to Uwe Kleine-König (The Capable Hub)While being less compact, using named initializers allows to more easily see which members of the structs are assigned which value without having to lookup the declaration of the struct. And it's also more robust against changes to the struct definition.
The mentioned robustness is relevant for a planned change to struct spi_device_id that replaces .driver_data by an anonymous union.
This patch doesn't modify the compiled arrays, only their representation in source form benefits. The former was confirmed with x86 and arm64 builds.
--- drivers/staging/iio/adc/ad7816.c | 6 +++--- drivers/staging/iio/frequency/ad9834.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-)
drivers/staging/iio/adc/ad7816.c +3 -3
@@ -426,9 +426,9 @@ static const struct of_device_id ad7816_of_match[] = {MODULE_DEVICE_TABLE (of, ad7816_of_match);static const struct spi_device_id ad7816_id[] = { - {"ad7816" ,ID_AD7816 }, - {"ad7817" ,ID_AD7817 }, - {"ad7818" ,ID_AD7818 }, + { .name ="ad7816" , .driver_data =ID_AD7816 }, + { .name ="ad7817" , .driver_data =ID_AD7817 }, + { .name ="ad7818" , .driver_data =ID_AD7818 }, { } };
drivers/staging/iio/frequency/ad9834.c +4 -4
@@ -465,10 +465,10 @@ static int ad9834_probe(struct spi_device *spi) }static const struct spi_device_id ad9834_id[] = { - {"ad9833" ,ID_AD9833 }, - {"ad9834" ,ID_AD9834 }, - {"ad9837" ,ID_AD9837 }, - {"ad9838" ,ID_AD9838 }, + { .name ="ad9833" , .driver_data =ID_AD9833 }, + { .name ="ad9834" , .driver_data =ID_AD9834 }, + { .name ="ad9837" , .driver_data =ID_AD9837 }, + { .name ="ad9838" , .driver_data =ID_AD9838 }, { } };MODULE_DEVICE_TABLE (spi, ad9834_id);
Signature · 1 line
2.47.3
Re: [PATCH v1 11/13] iio: Initialize spi_device_id arrays using member names
In reply to Uwe Kleine-König (The Capable Hub)Quoted 5 lines · Uwe Kleine-König (The Capable Hub)
While being less compact, using named initializers allows to more easily see which members of the structs are assigned which value without having to lookup the declaration of the struct. And it's also more robust against changes to the struct definition.
Quoted 8 lines
The mentioned robustness is relevant for a planned change to struct
spi_device_idthat replaces .driver_data by an anonymous union.This patch doesn't modify the compiled arrays, only their representation in source form benefits. The former was confirmed with x86 and arm64 builds.
Signed-off-by Uwe Kleine-König (The Capable Hub) <[email protected]>
Yours,
Linus Walleij
Re: [PATCH v1 03/13] iio: adc: ti-tsc2046: Drop unused member from private data
In reply to Uwe Kleine-König (The Capable Hub)Quoted 1 line · Uwe Kleine-König (The Capable Hub)
.dcfg is a write only field and thus it can be dropped.
Why isn't squashed with the previous one? Also, what about struct field and the accompanying data type definition?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 15 lines · Uwe Kleine-König (The Capable Hub)
Hello,
the first patch is a follow up for making iio's
i2c_device_idarrays use named initializers. The two drivers adapted in it were missed before because they were not yet in the tree I used to prepare the patch. The remainder is a similar adaption forspi_device_id. Instead of adapting arrays with a single entry and .driver_data, rework these to not use .driver_data.The ad9523 driver is a bit special here. It can only probe devices that have platform data. A device instantiated using dt never has platform data, so this driver only works for boards registering the device using a
spi_board_infostruct. There is no such board, and there never was one. So an alternative is to just drop this driver?!
Quoted 6 lines
I was unsure if I should post the staging patches in a separate series, I hope it's fine to include them here.
Best regards
Uwe
Tend to agree with Andy on the squash. Not a big deal to me though. Hence:
Quoted 194 lines
Uwe Kleine-König (The Capable Hub) (13):
iio: Initializei2c_device_idarrays using member names (part 2)
iio: adc: ti-tsc2046: Simplify device abstraction
iio: adc: ti-tsc2046: Drop unused member from private data
iio: adc: max1241: Simplify device abstraction
iio: dac: max5522: Simplify device abstraction
iio: frequency: ad9523: Simplify driver a bit
iio: imu: adis16550: Simplify device abstraction
iio: magnetometer: hmc5843: Simplify device abstraction
iio: accel: bmc150: Explicitly set spi .driver_data
iio: Drop unused assignment ofspi_device_iddriver data
iio: Initializespi_device_idarrays using member names
staging: iio: Drop unused assignment ofspi_device_iddriver data
staging: iio: Initializespi_device_idarrays using member namesdrivers/iio/accel/adxl345_spi.c | 4 +- drivers/iio/accel/adxl355_spi.c | 4 +- drivers/iio/accel/adxl367_spi.c | 2 +- drivers/iio/accel/adxl372_spi.c | 4 +- drivers/iio/accel/adxl380_spi.c | 8 +- drivers/iio/accel/bma220_spi.c | 2 +- drivers/iio/accel/bma400_spi.c | 2 +- drivers/iio/accel/bmc150-accel-spi.c | 18 +-- drivers/iio/accel/bmi088-accel-spi.c | 6 +- drivers/iio/accel/fxls8962af-spi.c | 4 +- drivers/iio/accel/kxsd9-spi.c | 2 +- drivers/iio/accel/mma7455_spi.c | 4 +- drivers/iio/accel/sca3000.c | 8 +- drivers/iio/accel/sca3300.c | 4 +- drivers/iio/accel/st_accel_spi.c | 40 +++--- drivers/iio/adc/ad4000.c | 62 ++++----- drivers/iio/adc/ad4030.c | 14 +- drivers/iio/adc/ad4080.c | 22 +-- drivers/iio/adc/ad4130.c | 12 +- drivers/iio/adc/ad4134.c | 2 +- drivers/iio/adc/ad4170-4.c | 6 +- drivers/iio/adc/ad4851.c | 18 +-- drivers/iio/adc/ad7091r8.c | 6 +- drivers/iio/adc/ad7124.c | 4 +- drivers/iio/adc/ad7173.c | 26 ++-- drivers/iio/adc/ad7191.c | 2 +- drivers/iio/adc/ad7192.c | 10 +- drivers/iio/adc/ad7266.c | 4 +- drivers/iio/adc/ad7280a.c | 2 +- drivers/iio/adc/ad7292.c | 2 +- drivers/iio/adc/ad7298.c | 2 +- drivers/iio/adc/ad7380.c | 36 ++--- drivers/iio/adc/ad7476.c | 60 ++++---- drivers/iio/adc/ad7606_spi.c | 22 +-- drivers/iio/adc/ad7766.c | 12 +- drivers/iio/adc/ad7768-1.c | 8 +- drivers/iio/adc/ad7780.c | 8 +- drivers/iio/adc/ad7791.c | 10 +- drivers/iio/adc/ad7793.c | 18 +-- drivers/iio/adc/ad7887.c | 2 +- drivers/iio/adc/ad7923.c | 14 +- drivers/iio/adc/ad7944.c | 6 +- drivers/iio/adc/ad7949.c | 6 +- drivers/iio/adc/ad9467.c | 14 +- drivers/iio/adc/ade9000.c | 2 +- drivers/iio/adc/hi8435.c | 2 +- drivers/iio/adc/max1027.c | 12 +- drivers/iio/adc/max1118.c | 6 +- drivers/iio/adc/max11205.c | 4 +- drivers/iio/adc/max11410.c | 2 +- drivers/iio/adc/max1241.c | 8 +- drivers/iio/adc/max14001.c | 4 +- drivers/iio/adc/mcp320x.c | 26 ++-- drivers/iio/adc/mcp3564.c | 24 ++-- drivers/iio/adc/mcp3911.c | 14 +- drivers/iio/adc/rohm-bd79112.c | 2 +- drivers/iio/adc/rtq6056.c | 4 +- drivers/iio/adc/ti-adc0832.c | 8 +- drivers/iio/adc/ti-adc084s021.c | 2 +- drivers/iio/adc/ti-adc108s102.c | 2 +- drivers/iio/adc/ti-adc12138.c | 6 +- drivers/iio/adc/ti-adc128s052.c | 24 ++-- drivers/iio/adc/ti-adc161s626.c | 4 +- drivers/iio/adc/ti-ads1018.c | 4 +- drivers/iio/adc/ti-ads124s08.c | 4 +- drivers/iio/adc/ti-ads1298.c | 2 +- drivers/iio/adc/ti-ads131e08.c | 6 +- drivers/iio/adc/ti-ads131m02.c | 10 +- drivers/iio/adc/ti-ads7950.c | 24 ++-- drivers/iio/adc/ti-ads8688.c | 4 +- drivers/iio/adc/ti-lmp92064.c | 2 +- drivers/iio/adc/ti-tlc4541.c | 4 +- drivers/iio/adc/ti-tsc2046.c | 12 +- drivers/iio/addac/ad74115.c | 2 +- drivers/iio/amplifiers/ad8366.c | 26 ++-- drivers/iio/amplifiers/ada4250.c | 2 +- drivers/iio/chemical/bme680_spi.c | 2 +- drivers/iio/chemical/ens160_spi.c | 2 +- drivers/iio/dac/ad3530r.c | 8 +- drivers/iio/dac/ad5064.c | 32 ++--- drivers/iio/dac/ad5360.c | 16 +-- drivers/iio/dac/ad5380.c | 32 ++--- drivers/iio/dac/ad5446-spi.c | 62 ++++----- drivers/iio/dac/ad5449.c | 14 +- drivers/iio/dac/ad5504.c | 4 +- drivers/iio/dac/ad5624r_spi.c | 12 +- drivers/iio/dac/ad5706r.c | 2 +- drivers/iio/dac/ad5755.c | 10 +- drivers/iio/dac/ad5758.c | 2 +- drivers/iio/dac/ad5761.c | 8 +- drivers/iio/dac/ad5764.c | 8 +- drivers/iio/dac/ad5766.c | 4 +- drivers/iio/dac/ad5770r.c | 2 +- drivers/iio/dac/ad5791.c | 10 +- drivers/iio/dac/ad7293.c | 2 +- drivers/iio/dac/ad7303.c | 2 +- drivers/iio/dac/ad8801.c | 4 +- drivers/iio/dac/ad9739a.c | 2 +- drivers/iio/dac/ltc1660.c | 4 +- drivers/iio/dac/ltc2632.c | 44 +++--- drivers/iio/dac/ltc2664.c | 4 +- drivers/iio/dac/ltc2688.c | 2 +- drivers/iio/dac/max22007.c | 2 +- drivers/iio/dac/max5522.c | 31 +---- drivers/iio/dac/mcp4821.c | 12 +- drivers/iio/dac/mcp4922.c | 8 +- drivers/iio/dac/rohm-bd79703.c | 8 +- drivers/iio/dac/ti-dac082s085.c | 12 +- drivers/iio/dac/ti-dac7311.c | 6 +- drivers/iio/dac/ti-dac7612.c | 2 +- drivers/iio/filter/admv8818.c | 2 +- drivers/iio/frequency/ad9523.c | 3 +- drivers/iio/frequency/adf4350.c | 4 +- drivers/iio/frequency/adf4371.c | 4 +- drivers/iio/frequency/adf4377.c | 4 +- drivers/iio/frequency/admv1013.c | 2 +- drivers/iio/frequency/admv1014.c | 2 +- drivers/iio/frequency/adrf6780.c | 2 +- drivers/iio/gyro/adis16080.c | 4 +- drivers/iio/gyro/adis16136.c | 8 +- drivers/iio/gyro/adis16260.c | 12 +- drivers/iio/gyro/adxrs450.c | 4 +- drivers/iio/gyro/bmg160_spi.c | 7 +- drivers/iio/gyro/fxas21002c_spi.c | 2 +- drivers/iio/gyro/st_gyro_spi.c | 18 +-- drivers/iio/health/afe4403.c | 2 +- drivers/iio/humidity/hts221_spi.c | 2 +- drivers/iio/imu/adis16400.c | 30 ++-- drivers/iio/imu/adis16460.c | 2 +- drivers/iio/imu/adis16475.c | 54 ++++---- drivers/iio/imu/adis16480.c | 40 +++--- drivers/iio/imu/adis16550.c | 9 +- drivers/iio/imu/bmi160/bmi160_spi.c | 4 +- drivers/iio/imu/bmi270/bmi270_spi.c | 4 +- drivers/iio/imu/bmi323/bmi323_spi.c | 2 +- drivers/iio/imu/fxos8700_spi.c | 2 +- .../iio/imu/inv_icm42600/inv_icm42600_spi.c | 14 +- .../iio/imu/inv_icm45600/inv_icm45600_spi.c | 16 +-- drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c | 34 ++--- drivers/iio/imu/smi240.c | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c | 48 +++---- drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c | 4 +- drivers/iio/light/st_uvis25_spi.c | 2 +- drivers/iio/magnetometer/bmc150_magn_spi.c | 6 +- drivers/iio/magnetometer/hmc5843_spi.c | 6 +- drivers/iio/magnetometer/mmc5983.c | 2 +- drivers/iio/magnetometer/st_magn_spi.c | 12 +- drivers/iio/potentiometer/max5481.c | 8 +- drivers/iio/potentiometer/max5487.c | 6 +- drivers/iio/potentiometer/mcp41010.c | 12 +- drivers/iio/potentiometer/mcp4131.c | 128 +++++++++--------- drivers/iio/potentiometer/x9250.c | 4 +- drivers/iio/pressure/abp2030pa_spi.c | 2 +- drivers/iio/pressure/bmp280-spi.c | 14 +- drivers/iio/pressure/hsc030pa_spi.c | 2 +- drivers/iio/pressure/mpl115_spi.c | 2 +- drivers/iio/pressure/mprls0025pa_spi.c | 2 +- drivers/iio/pressure/ms5611_spi.c | 4 +- drivers/iio/pressure/st_pressure_spi.c | 24 ++-- drivers/iio/pressure/zpa2326_spi.c | 2 +- drivers/iio/proximity/as3935.c | 2 +- drivers/iio/resolver/ad2s1200.c | 4 +- drivers/iio/resolver/ad2s1210.c | 2 +- drivers/iio/resolver/ad2s90.c | 2 +- drivers/iio/temperature/ltc2983.c | 10 +- drivers/iio/temperature/max31856.c | 2 +- drivers/iio/temperature/max31865.c | 2 +- drivers/iio/temperature/maxim_thermocouple.c | 18 +-- drivers/staging/iio/adc/ad7816.c | 6 +- drivers/staging/iio/addac/adt7316-spi.c | 13 +- drivers/staging/iio/frequency/ad9832.c | 4 +- drivers/staging/iio/frequency/ad9834.c | 8 +- 172 files changed, 886 insertions(+), 927 deletions(-)base-commit:
3ce97bd3c4f18608335e709c24d6a40e7036cab8Signature · 1 line
2.47.3
Re: [PATCH v1 03/13] iio: adc: ti-tsc2046: Drop unused member from private data
In reply to Andy ShevchenkoQuoted 4 lines · Andy Shevchenko
Quoted 1 line · Uwe Kleine-König (The Capable Hub)
.dcfg is a write only field and thus it can be dropped.
Why isn't squashed with the previous one?
Because they are two different logical changes. But I don't feel strong here and can squash them together.
Quoted 2 lines
Also, what about struct field and the accompanying data type definition?
It took me a while to understand that suggestion. I guess you're talking about
drivers/iio/adc/ti-tsc2046.c +2 -13
@@ -121,11 +121,6 @@ struct tsc2046_adc_group_layout {unsigned int skip; }; -struct tsc2046_adc_dcfg { -const struct iio_chan_spec *channels; -unsigned int num_channels; -}; -struct tsc2046_adc_ch_cfg {unsigned int settling_time_us;unsigned int oversampling_ratio;
@@ -213,11 +208,6 @@ const struct iio_chan_spec name ## _channels[] = { \ static DECLARE_TI_TSC2046_8_CHANNELS(tsc2046_adc, 12); -static const struct tsc2046_adc_dcfg tsc2046_adc_dcfg_tsc2046e = { - .channels = tsc2046_adc_channels, - .num_channels =ARRAY_SIZE (tsc2046_adc_channels), -}; -/* * Convert time to a number of samples which can be transferred within this * time.
@@ -738,7 +728,6 @@ static void tsc2046_adc_parse_fwnode(struct tsc2046_adc_priv *priv)static int tsc2046_adc_probe (struct spi_device *spi) { -const struct tsc2046_adc_dcfg *dcfg = &tsc2046_adc_dcfg_tsc2046e;struct device *dev = &spi->dev;struct tsc2046_adc_priv *priv;struct iio_dev *indio_dev;
@@ -767,8 +756,8 @@ static int tsc2046_adc_probe(struct spi_device *spi) indio_dev->name =TI_TSC2046_NAME ; indio_dev->modes =INDIO_DIRECT_MODE ; - indio_dev->channels = dcfg->channels; - indio_dev->num_channels = dcfg->num_channels; + indio_dev->channels = tsc2046_adc_channels; + indio_dev->num_channels =ARRAY_SIZE (tsc2046_adc_channels); indio_dev->info = &tsc2046_adc_info; ret =devm_regulator_get_enable_read_voltage (dev,"vref" );
on top of my changes. Yes, that makes sense.
Best regards
Uwe
Jonathan Cameron
maintainerRe: [PATCH v1 01/13] iio: Initialize i2c_device_id arrays using member names (part 2)
In reply to Uwe Kleine-König (The Capable Hub)Quoted 6 lines · On Fri, 19 Jun 2026 17:54:29 +0200 Uwe Kleine-König (The Capable Hub)…
This is a follow-up for commit
f68afce8e8a7("iio: Initializei2c_device_idarrays using member names"). This previous commit missed these two instances because these drivers didn't exist yet in the tree where I prepared the respective patch.Signed-off-by Uwe Kleine-König (The Capable Hub) <[email protected]>
Applied to the testing branch of iio.git.
Thanks,
Jonathan
Jonathan Cameron
maintainerRe: [PATCH v1 04/13] iio: adc: max1241: Simplify device abstraction
In reply to Uwe Kleine-König (The Capable Hub)Quoted 8 lines · On Fri, 19 Jun 2026 17:54:32 +0200 Uwe Kleine-König (The Capable Hub)…
The driver was introduced in 2020 and since then only supports a single chip variant and .driver_data was unused from the start.
Drop the assignment for .driver_data and hardcode the device name instead of doing a lookup in a table with only one entry. While touching that array, make use of a named initializer.
Signed-off-by Uwe Kleine-König (The Capable Hub) <[email protected]>
Applied this one.
Thanks,
Jonathan
Re: [PATCH v1 05/13] iio: dac: max5522: Simplify device abstraction
In reply to Uwe Kleine-König (The Capable Hub)Quoted 9 lines · On Fri, 19 Jun 2026 17:54:33 +0200 Uwe Kleine-König (The Capable Hub)…
The driver only supports a single chip variant since it's birth in 2022. Both the spi
id_tableand the ofid_tableare essentially unused (only assigned to a write-only member in private data).Hardcode the device name and then drop various unused stuff from the driver. While touching the spi
id_tableassign .name using a named initializer.Signed-off-by Uwe Kleine-König (The Capable Hub) <[email protected]>
Hmm. This one was a bit silly wasn't it? :)
Applied.
Quoted 79 lines
--- drivers/iio/dac/max5522.c | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-)drivers/iio/dac/max5522.c +3
-28@@ -25,15 +25,8 @@#define MAX5522_REG_DATA (x) ((x) + MAX5522_CTRL_LOAD_IN_A) -struct max5522_chip_info { -const char *name; -const struct iio_chan_spec *channels; -unsigned int num_channels; -}; -struct max5522_state {struct regmap *regmap; -const struct max5522_chip_info *chip_info;unsigned short dac_cache[2 ];int vref_mV; };@@ -58,18 +51,6 @@ static const struct iio_chan_spec max5522_channels[] = { MAX5522_CHANNEL(1), }; -enum max5522_type { -ID_MAX5522 , -}; - -static const struct max5522_chip_info max5522_chip_info_tbl[] = { - [ID_MAX5522 ] = { - .name ="max5522" , - .channels = max5522_channels, - .num_channels =2 , - }, -}; -static inline int max5522_info_to_reg (struct iio_chan_spec const *chan) {return MAX5522_REG_DATA (chan->channel);@@ -140,9 +121,6 @@ static int max5522_spi_probe(struct spi_device *spi) } state =iio_priv (indio_dev); - state->chip_info =spi_get_device_match_data (spi); -if (!state->chip_info) -return -EINVAL ; ret =devm_regulator_get_enable_read_voltage (&spi->dev,"vrefin" );if (ret <0 )@@ -159,22 +137,19 @@ static int max5522_spi_probe(struct spi_device *spi) indio_dev->modes =INDIO_DIRECT_MODE ; indio_dev->channels = max5522_channels; indio_dev->num_channels =ARRAY_SIZE (max5522_channels); - indio_dev->name = max5522_chip_info_tbl[ID_MAX5522 ].name; + indio_dev->name ="max5522" ;return devm_iio_device_register (&spi->dev, indio_dev); }static const struct spi_device_id max5522_ids[] = { - {"max5522" , (kernel_ulong_t)&max5522_chip_info_tbl[ID_MAX5522 ] }, + { .name ="max5522" }, { } };MODULE_DEVICE_TABLE (spi, max5522_ids);static const struct of_device_id max5522_of_match[] = { - { - .compatible ="maxim,max5522" , - .data = &max5522_chip_info_tbl[ID_MAX5522 ], - }, + { .compatible ="maxim,max5522" }, { } };MODULE_DEVICE_TABLE (of, max5522_of_match);
Jonathan Cameron
maintainerRe: [PATCH v1 06/13] iio: frequency: ad9523: Simplify driver a bit
In reply to Uwe Kleine-König (The Capable Hub)Quoted 7 lines · On Fri, 19 Jun 2026 17:54:34 +0200 Uwe Kleine-König (The Capable Hub)…
spi driver data is only set but never used, so the assignment can be dropped. Also the spi id_table's .driver_data is unused and can be dropped.
While touching the spi
id_tablemodify it to use a named initializer.Signed-off-by Uwe Kleine-König (The Capable Hub) <[email protected]>
Whilst you are here I think it makes sense to at least set the appropriate leg of:
indio_dev->name = (pdata->name[0] != 0) ? pdata->name : spi_get_device_id(spi)->name;
to the name string directly rather than via the spi_device_id.
Maybe that's a job for someone who is ripping out the all the pdata in favour of
a device tree binding. Ok I've argued myself into picking this up as it stands
on basis that change probably fits better in a separate rather more complex series.
ADI people, is this one on your list to either modernize, or potentially drop?
In mean time I've applied this.
Thanks,
Jonathan
Quoted 25 lines
--- drivers/iio/frequency/ad9523.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/iio/frequency/ad9523.c +1
-2@@ -990,7 +990,6 @@ static int ad9523_probe(struct spi_device *spi)if (IS_ERR (st->sync_gpio))return PTR_ERR (st->sync_gpio); -spi_set_drvdata (spi, indio_dev); st->spi = spi; st->pdata = pdata;@@ -1009,7 +1008,7 @@ static int ad9523_probe(struct spi_device *spi) }static const struct spi_device_id ad9523_id[] = { - {"ad9523-1" ,9523 }, + { .name ="ad9523-1" }, { } };MODULE_DEVICE_TABLE (spi, ad9523_id);
Jonathan Cameron
maintainerRe: [PATCH v1 07/13] iio: imu: adis16550: Simplify device abstraction
In reply to Uwe Kleine-König (The Capable Hub)Quoted 6 lines · On Fri, 19 Jun 2026 17:54:35 +0200 Uwe Kleine-König (The Capable Hub)…
The driver supports a single chip variant only. Simplify the driver by hard-coding the device properties instead of using the id_table's abstraction for a single chip type and a lookup in a table with only one entry.
Signed-off-by Uwe Kleine-König (The Capable Hub) <[email protected]>
For this one I'd like some feedback from Analog people.
The reason being that we could do similar to Andy's suggestion for the tsc2046 and rip out the chip_info structure in favour of hard coding everything in there. However, if we know there are similar parts and that their is some plan to add support for them - I'd rather not have the churn of ripping it out only to revert a little later.
So Nuno, Michael etc, where do we think this one is going?
(and yes I'm too busy / lazy / behind on review to go look for parts that look similar!)
Jonathan
Quoted 36 lines
--- drivers/iio/imu/adis16550.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)drivers/iio/imu/adis16550.c +4
-5@@ -1064,9 +1064,8 @@ static int adis16550_probe(struct spi_device *spi)return -ENOMEM ; st =iio_priv (indio_dev); - st->info =spi_get_device_match_data (spi); -if (!st->info) -return -EINVAL ; + st->info = &adis16550_chip_info; + adis = &st->adis; indio_dev->name = st->info->name; indio_dev->channels = st->info->channels;@@ -1117,13 +1116,13 @@ static int adis16550_probe(struct spi_device *spi) }static const struct spi_device_id adis16550_id[] = { - {"adis16550" , (kernel_ulong_t)&adis16550_chip_info}, + { .name ="adis16550" }, { } };MODULE_DEVICE_TABLE (spi, adis16550_id);static const struct of_device_id adis16550_of_match[] = { - { .compatible ="adi,adis16550" , .data = &adis16550_chip_info }, + { .compatible ="adi,adis16550" }, { } };MODULE_DEVICE_TABLE (of, adis16550_of_match);
Jonathan Cameron
maintainerRe: [PATCH v1 08/13] iio: magnetometer: hmc5843: Simplify device abstraction
In reply to Uwe Kleine-König (The Capable Hub)Quoted 6 lines · On Fri, 19 Jun 2026 17:54:36 +0200 Uwe Kleine-König (The Capable Hub)…
The driver supports a single chip variant only. Simplify the driver by hard-coding the device properties instead of using the id_table's abstraction for a single chip type and a lookup in a table with only one entry.
Signed-off-by Uwe Kleine-König (The Capable Hub) <[email protected]>
Applied this one.
Thanks,
J
Re: [PATCH v1 09/13] iio: accel: bmc150: Explicitly set spi .driver_data
In reply to Uwe Kleine-König (The Capable Hub)Quoted 11 lines · On Fri, 19 Jun 2026 17:54:37 +0200 Uwe Kleine-König (The Capable Hub)…
There is one id entry that has an explicit assignment to .driver_data. To make the intention clearer, assign
BOSCH_UNKNOWN(which is also 0) for all previously ids that had .driver_data = 0 implicitly before.While touching all entries in this array, convert to named initializers.
This change is similar to commit
e50856dc41e8("iio: accel: bmc150:
Explicitly set .driver_data") but cares for the driver's spi part instead of i2c.Signed-off-by Uwe Kleine-König (The Capable Hub) <[email protected]>
Applied.
Re: [PATCH v1 11/13] iio: Initialize spi_device_id arrays using member names
In reply to Linus WalleijQuoted 15 lines · On Fri, 19 Jun 2026 22:19:50 +0200 Linus Walleij <[email protected]> wrote:
Quoted 12 lines · Uwe Kleine-König (The Capable Hub)
While being less compact, using named initializers allows to more easily see which members of the structs are assigned which value without having to lookup the declaration of the struct. And it's also more robust against changes to the struct definition.
The mentioned robustness is relevant for a planned change to struct
spi_device_idthat replaces .driver_data by an anonymous union.This patch doesn't modify the compiled arrays, only their representation in source form benefits. The former was confirmed with x86 and arm64 builds.
Quoted 6 lines
Quoted 1 line
Signed-off-by Uwe Kleine-König (The Capable Hub) <[email protected]>Acked-by Linus Walleij <[email protected]>Yours,
Linus Walleij
Applied. Thanks!
J
Re: [PATCH v1 13/13] staging: iio: Initialize spi_device_id arrays using member names
In reply to Uwe Kleine-König (The Capable Hub)Quoted 5 lines · On Fri, 19 Jun 2026 17:54:41 +0200 Uwe Kleine-König (The Capable Hub)…
While being less compact, using named initializers allows to more easily see which members of the structs are assigned which value without having to lookup the declaration of the struct. And it's also more robust against changes to the struct definition.
Quoted 8 lines
The mentioned robustness is relevant for a planned change to struct
spi_device_idthat replaces .driver_data by an anonymous union.This patch doesn't modify the compiled arrays, only their representation in source form benefits. The former was confirmed with x86 and arm64 builds.
Signed-off-by Uwe Kleine-König (The Capable Hub) <[email protected]>
Applied. So that leaves the pair related to Andy's comment and that ADI IMU for a v2.
Thanks for your hard work on this. I merged it fairly quick because I know we are going to have some merge conflicts (mostly other folk tidying up individual drivers as part of more complex changes)
Jonathan
Re: [PATCH v1 13/13] staging: iio: Initialize spi_device_id arrays using member names
Hello Jonathan,
Quoted 15 lines · Jonathan Cameron
Quoted 12 lines · On Fri, 19 Jun 2026 17:54:41 +0200 Uwe Kleine-König (The Capable Hub)…
While being less compact, using named initializers allows to more easily see which members of the structs are assigned which value without having to lookup the declaration of the struct. And it's also more robust against changes to the struct definition.
The mentioned robustness is relevant for a planned change to struct
spi_device_idthat replaces .driver_data by an anonymous union.This patch doesn't modify the compiled arrays, only their representation in source form benefits. The former was confirmed with x86 and arm64 builds.
Quoted 7 lines
Quoted 1 line
Signed-off-by Uwe Kleine-König (The Capable Hub) <[email protected]>Applied. So that leaves the pair related to Andy's comment and that ADI IMU for a v2.
Thanks for your hard work on this. I merged it fairly quick because I know we are going to have some merge conflicts (mostly other folk tidying up individual drivers as part of more complex changes)
Thanks for your cooperation and merging it. The combination makes this worthwhile.
Best regards
Uwe