Skip to content

Commit

Permalink
iio: Remove superfluous of_node assignments
Browse files Browse the repository at this point in the history
If a driver does not assign an of_node to a IIO device to IIO core will
automatically assign the of_node of the parent device. This automatic
assignment is done in the iio_device_register() function.

There is a fair amount of drivers that currently manually assign the
of_node of the IIO device. All but 4 of them can make use of the automatic
assignment though.

The exceptions are:
 * mxs-lradc-adc: Which uses the of_node of the parent of the parent.
 * stm32-dfsdm-adc, stm32-adc and stm32-dac: Which reference the of_node
   assigned to the IIO device before iio_device_register() is called.

All other drivers are updated to use automatic assignment. This reduces
the amount of boilerplate code involved in setting up the IIO device.

The patch has mostly been auto-generated with the following semantic patch

// <smpl>
@exists@
expression indio_dev;
expression parent;
@@
indio_dev = \(devm_iio_device_alloc\|iio_device_alloc\)(&parent, ...)
...
-indio_dev->dev.of_node = parent.of_node;

@exists@
expression indio_dev;
expression parent;
@@
indio_dev = \(devm_iio_device_alloc\|iio_device_alloc\)(parent, ...)
...
-indio_dev->dev.of_node = parent->of_node;
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  • Loading branch information
Lars-Peter Clausen authored and Jonathan Cameron committed Jun 14, 2020
1 parent 8f73a13 commit 8cb631c
Show file tree
Hide file tree
Showing 57 changed files with 0 additions and 58 deletions.
1 change: 0 additions & 1 deletion drivers/iio/accel/ssp_accel_sensor.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ static int ssp_accel_probe(struct platform_device *pdev)
spd->type = SSP_ACCELEROMETER_SENSOR;

indio_dev->name = ssp_accel_device_name;
indio_dev->dev.of_node = pdev->dev.of_node;
indio_dev->info = &ssp_accel_iio_info;
indio_dev->modes = INDIO_BUFFER_SOFTWARE;
indio_dev->channels = ssp_acc_channels;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/ab8500-gpadc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,6 @@ static int ab8500_gpadc_probe(struct platform_device *pdev)

pm_runtime_put(dev);

indio_dev->dev.of_node = np;
indio_dev->name = "ab8500-gpadc";
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &ab8500_gpadc_info;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/ad7266.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,6 @@ static int ad7266_probe(struct spi_device *spi)
spi_set_drvdata(spi, indio_dev);
st->spi = spi;

indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &ad7266_info;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/ad7291.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,6 @@ static int ad7291_probe(struct i2c_client *client,
indio_dev->channels = ad7291_channels;
indio_dev->num_channels = ARRAY_SIZE(ad7291_channels);

indio_dev->dev.of_node = client->dev.of_node;
indio_dev->info = &ad7291_info;
indio_dev->modes = INDIO_DIRECT_MODE;

Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/ad7298.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@ static int ad7298_probe(struct spi_device *spi)
st->spi = spi;

indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->channels = ad7298_channels;
indio_dev->num_channels = ARRAY_SIZE(ad7298_channels);
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/ad7476.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ static int ad7476_probe(struct spi_device *spi)

st->spi = spi;

indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->channels = st->chip_info->channel;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/ad7791.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,6 @@ static int ad7791_probe(struct spi_device *spi)

spi_set_drvdata(spi, indio_dev);

indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->channels = st->info->channels;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/ad7793.c
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,6 @@ static int ad7793_probe(struct spi_device *spi)

spi_set_drvdata(spi, indio_dev);

indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->channels = st->chip_info->channels;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/ad7887.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ static int ad7887_probe(struct spi_device *spi)
spi_set_drvdata(spi, indio_dev);
st->spi = spi;

indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->info = &ad7887_info;
indio_dev->modes = INDIO_DIRECT_MODE;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/ad7923.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ static int ad7923_probe(struct spi_device *spi)
info = &ad7923_chip_info[spi_get_device_id(spi)->driver_data];

indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->channels = info->channels;
indio_dev->num_channels = info->num_channels;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/ad7949.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ static int ad7949_spi_probe(struct spi_device *spi)
return -ENOMEM;
}

indio_dev->dev.of_node = dev->of_node;
indio_dev->info = &ad7949_spi_info;
indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->modes = INDIO_DIRECT_MODE;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/ad799x.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,6 @@ static int ad799x_probe(struct i2c_client *client,

st->client = client;

indio_dev->dev.of_node = client->dev.of_node;
indio_dev->name = id->name;
indio_dev->info = st->chip_config->info;

Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/axp20x_adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,6 @@ static int axp20x_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, indio_dev);

info->regmap = axp20x_dev->regmap;
indio_dev->dev.of_node = pdev->dev.of_node;
indio_dev->modes = INDIO_DIRECT_MODE;

if (!pdev->dev.of_node) {
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/bcm_iproc_adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,6 @@ static int iproc_adc_probe(struct platform_device *pdev)
}

indio_dev->name = "iproc-static-adc";
indio_dev->dev.of_node = pdev->dev.of_node;
indio_dev->info = &iproc_adc_iio_info;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->channels = iproc_adc_iio_channels;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/cpcap-adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,6 @@ static int cpcap_adc_probe(struct platform_device *pdev)
init_waitqueue_head(&ddata->wq_data_avail);

indio_dev->modes = INDIO_DIRECT_MODE | INDIO_BUFFER_SOFTWARE;
indio_dev->dev.of_node = pdev->dev.of_node;
indio_dev->channels = cpcap_adc_channels;
indio_dev->num_channels = ARRAY_SIZE(cpcap_adc_channels);
indio_dev->name = dev_name(&pdev->dev);
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/da9150-gpadc.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,6 @@ static int da9150_gpadc_probe(struct platform_device *pdev)
}

indio_dev->name = dev_name(dev);
indio_dev->dev.of_node = pdev->dev.of_node;
indio_dev->info = &da9150_gpadc_info;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->channels = da9150_gpadc_channels;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/envelope-detector.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@ static int envelope_detector_probe(struct platform_device *pdev)
INIT_DELAYED_WORK(&env->comp_timeout, envelope_detector_timeout);

indio_dev->name = dev_name(dev);
indio_dev->dev.of_node = dev->of_node;
indio_dev->info = &envelope_detector_info;
indio_dev->channels = &envelope_detector_iio_channel;
indio_dev->num_channels = 1;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/exynos_adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,6 @@ static int exynos_adc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, indio_dev);

indio_dev->name = dev_name(&pdev->dev);
indio_dev->dev.of_node = pdev->dev.of_node;
indio_dev->info = &exynos_adc_iio_info;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->channels = exynos_adc_iio_channels;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/hi8435.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,6 @@ static int hi8435_probe(struct spi_device *spi)
spi_set_drvdata(spi, idev);
mutex_init(&priv->lock);

idev->dev.of_node = spi->dev.of_node;
idev->name = spi_get_device_id(spi)->name;
idev->modes = INDIO_DIRECT_MODE;
idev->info = &hi8435_info;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/ina2xx-adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,6 @@ static int ina2xx_probe(struct i2c_client *client,
}

indio_dev->modes = INDIO_DIRECT_MODE | INDIO_BUFFER_SOFTWARE;
indio_dev->dev.of_node = client->dev.of_node;
if (id->driver_data == ina226) {
indio_dev->channels = ina226_channels;
indio_dev->num_channels = ARRAY_SIZE(ina226_channels);
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/lp8788_adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ static int lp8788_adc_probe(struct platform_device *pdev)
adc->lp = lp;
platform_set_drvdata(pdev, indio_dev);

indio_dev->dev.of_node = pdev->dev.of_node;
ret = lp8788_iio_map_register(indio_dev, lp->pdata, adc);
if (ret)
return ret;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/max1027.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,6 @@ static int max1027_probe(struct spi_device *spi)
mutex_init(&st->lock);

indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->info = &max1027_info;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->channels = st->info->channels;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/max11100.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ static int max11100_probe(struct spi_device *spi)
state = iio_priv(indio_dev);
state->spi = spi;

indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->name = "max11100";
indio_dev->info = &max11100_info;
indio_dev->modes = INDIO_DIRECT_MODE;
Expand Down
2 changes: 0 additions & 2 deletions drivers/iio/adc/max1363.c
Original file line number Diff line number Diff line change
Expand Up @@ -1593,7 +1593,6 @@ static int max1363_probe(struct i2c_client *client,
if (!indio_dev)
return -ENOMEM;

indio_dev->dev.of_node = client->dev.of_node;
ret = iio_map_array_register(indio_dev, client->dev.platform_data);
if (ret < 0)
return ret;
Expand Down Expand Up @@ -1652,7 +1651,6 @@ static int max1363_probe(struct i2c_client *client,
if (ret)
goto error_disable_reg;

indio_dev->dev.of_node = client->dev.of_node;
indio_dev->name = id->name;
indio_dev->channels = st->chip_info->channels;
indio_dev->num_channels = st->chip_info->num_channels;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/max9611.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,6 @@ static int max9611_probe(struct i2c_client *client,
if (ret)
return ret;

indio_dev->dev.of_node = client->dev.of_node;
indio_dev->name = of_id->data;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &indio_info;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/mcp320x.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@ static int mcp320x_probe(struct spi_device *spi)
adc = iio_priv(indio_dev);
adc->spi = spi;

indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &mcp320x_info;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/mcp3422.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@ static int mcp3422_probe(struct i2c_client *client,

mutex_init(&adc->lock);

indio_dev->dev.of_node = client->dev.of_node;
indio_dev->name = dev_name(&client->dev);
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &mcp3422_info;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/mcp3911.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@ static int mcp3911_probe(struct spi_device *spi)
if (ret)
goto clk_disable;

indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &mcp3911_info;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/meson_saradc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,6 @@ static int meson_sar_adc_probe(struct platform_device *pdev)
priv->param = match_data->param;

indio_dev->name = match_data->name;
indio_dev->dev.of_node = pdev->dev.of_node;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &meson_sar_adc_iio_info;

Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/nau7802.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,6 @@ static int nau7802_probe(struct i2c_client *client,

i2c_set_clientdata(client, indio_dev);

indio_dev->dev.of_node = client->dev.of_node;
indio_dev->name = dev_name(&client->dev);
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &nau7802_info;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/qcom-pm8xxx-xoadc.c
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,6 @@ static int pm8xxx_xoadc_probe(struct platform_device *pdev)
goto out_disable_vref;
}

indio_dev->dev.of_node = np;
indio_dev->name = variant->name;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &pm8xxx_xoadc_info;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/qcom-spmi-adc5.c
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,6 @@ static int adc5_probe(struct platform_device *pdev)
return ret;
}

indio_dev->dev.of_node = node;
indio_dev->name = pdev->name;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = adc->data->info;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/qcom-spmi-iadc.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,6 @@ static int iadc_probe(struct platform_device *pdev)
return ret;
}

indio_dev->dev.of_node = node;
indio_dev->name = pdev->name;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &iadc_info;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/qcom-spmi-vadc.c
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,6 @@ static int vadc_probe(struct platform_device *pdev)
if (ret)
return ret;

indio_dev->dev.of_node = node;
indio_dev->name = pdev->name;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &vadc_info;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/rcar-gyroadc.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,6 @@ static int rcar_gyroadc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, indio_dev);

indio_dev->name = DRIVER_NAME;
indio_dev->dev.of_node = pdev->dev.of_node;
indio_dev->info = &rcar_gyroadc_iio_info;
indio_dev->modes = INDIO_DIRECT_MODE;

Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/rockchip_saradc.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ static int rockchip_saradc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, indio_dev);

indio_dev->name = dev_name(&pdev->dev);
indio_dev->dev.of_node = pdev->dev.of_node;
indio_dev->info = &rockchip_saradc_iio_info;
indio_dev->modes = INDIO_DIRECT_MODE;

Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/sd_adc_modulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ static int iio_sd_mod_probe(struct platform_device *pdev)
if (!iio)
return -ENOMEM;

iio->dev.of_node = dev->of_node;
iio->name = dev_name(dev);
iio->info = &iio_sd_mod_iio_info;
iio->modes = INDIO_BUFFER_HARDWARE;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/sun4i-gpadc-iio.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,6 @@ static int sun4i_gpadc_probe(struct platform_device *pdev)
info->indio_dev = indio_dev;
init_completion(&info->completion);
indio_dev->name = dev_name(&pdev->dev);
indio_dev->dev.of_node = pdev->dev.of_node;
indio_dev->info = &sun4i_gpadc_iio_info;
indio_dev->modes = INDIO_DIRECT_MODE;

Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/ti-adc081c.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ static int adc081c_probe(struct i2c_client *client,
if (err < 0)
return err;

iio->dev.of_node = client->dev.of_node;
iio->name = dev_name(&client->dev);
iio->modes = INDIO_DIRECT_MODE;
iio->info = &adc081c_info;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/ti-adc0832.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ static int adc0832_probe(struct spi_device *spi)
mutex_init(&adc->lock);

indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->info = &adc0832_info;
indio_dev->modes = INDIO_DIRECT_MODE;

Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/ti-adc084s021.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ static int adc084s021_probe(struct spi_device *spi)
spi_set_drvdata(spi, indio_dev);

/* Initiate the Industrial I/O device */
indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &adc084s021_info;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/ti-adc128s052.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ static int adc128_probe(struct spi_device *spi)

spi_set_drvdata(spi, indio_dev);

indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &adc128_info;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/ti-adc161s626.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ static int ti_adc_probe(struct spi_device *spi)
return -ENOMEM;

indio_dev->info = &ti_adc_info;
indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->name = TI_ADC_DRV_NAME;
indio_dev->modes = INDIO_DIRECT_MODE;
spi_set_drvdata(spi, indio_dev);
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/ti-ads1015.c
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,6 @@ static int ads1015_probe(struct i2c_client *client,

mutex_init(&data->lock);

indio_dev->dev.of_node = client->dev.of_node;
indio_dev->name = ADS1015_DRV_NAME;
indio_dev->modes = INDIO_DIRECT_MODE;

Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/ti-ads124s08.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ static int ads124s_probe(struct spi_device *spi)
ads124s_priv->spi = spi;

indio_dev->name = spi_id->name;
indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->channels = ads124s_priv->chip_info->channels;
indio_dev->num_channels = ads124s_priv->chip_info->num_channels;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/ti-ads8344.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ static int ads8344_probe(struct spi_device *spi)
mutex_init(&adc->lock);

indio_dev->name = dev_name(&spi->dev);
indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->info = &ads8344_info;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->channels = ads8344_channels;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/ti-ads8688.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,6 @@ static int ads8688_probe(struct spi_device *spi)
st->spi = spi;

indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->channels = st->chip_info->channels;
indio_dev->num_channels = st->chip_info->num_channels;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/twl4030-madc.c
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,6 @@ static int twl4030_madc_probe(struct platform_device *pdev)
madc->dev = &pdev->dev;

iio_dev->name = dev_name(&pdev->dev);
iio_dev->dev.of_node = pdev->dev.of_node;
iio_dev->info = &twl4030_madc_iio_info;
iio_dev->modes = INDIO_DIRECT_MODE;
iio_dev->channels = twl4030_madc_iio_channels;
Expand Down
1 change: 0 additions & 1 deletion drivers/iio/adc/vf610_adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,6 @@ static int vf610_adc_probe(struct platform_device *pdev)
init_completion(&info->completion);

indio_dev->name = dev_name(&pdev->dev);
indio_dev->dev.of_node = pdev->dev.of_node;
indio_dev->info = &vf610_adc_iio_info;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->channels = vf610_adc_iio_channels;
Expand Down
Loading

0 comments on commit 8cb631c

Please sign in to comment.