Skip to content

Commit 8f73a13

Browse files
commodojic23
authored andcommitted
iio: remove left-over parent assignments
These were found by doing some shell magic: ------------ for file in $(git grep -w devm_iio_device_alloc | cut -d: -f1 | sort | uniq) ; do if grep 'parent =' $file | grep -v trig | grep -vq devm_; then echo "$file -> $(grep "parent =" $file)" fi done ----------- The output is bearable [after the semantic patch is applied]. There is a mix of trigger assignments with some iio device parent assignments that are removed via this patch. JC: A few more added via inspection of all parent = statements in drivers/iio. Some of these may just have crossed with this series, others were less obvious to scripting due to some cross file / module boundary calls. Signed-off-by: Alexandru Ardelean <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 2c9d8e1 commit 8f73a13

File tree

34 files changed

+0
-35
lines changed

34 files changed

+0
-35
lines changed

drivers/iio/accel/kxcjk-1013.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1311,7 +1311,6 @@ static int kxcjk1013_probe(struct i2c_client *client,
13111311

13121312
mutex_init(&data->mutex);
13131313

1314-
indio_dev->dev.parent = &client->dev;
13151314
indio_dev->channels = kxcjk1013_channels;
13161315
indio_dev->num_channels = ARRAY_SIZE(kxcjk1013_channels);
13171316
indio_dev->available_scan_masks = kxcjk1013_scan_masks;

drivers/iio/accel/mma8452.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1592,7 +1592,6 @@ static int mma8452_probe(struct i2c_client *client,
15921592
i2c_set_clientdata(client, indio_dev);
15931593
indio_dev->info = &mma8452_info;
15941594
indio_dev->name = id->name;
1595-
indio_dev->dev.parent = &client->dev;
15961595
indio_dev->modes = INDIO_DIRECT_MODE;
15971596
indio_dev->channels = data->chip_info->channels;
15981597
indio_dev->num_channels = data->chip_info->num_channels;

drivers/iio/accel/mma9553.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,6 @@ static int mma9553_probe(struct i2c_client *client,
11031103
if (ret < 0)
11041104
return ret;
11051105

1106-
indio_dev->dev.parent = &client->dev;
11071106
indio_dev->channels = mma9553_channels;
11081107
indio_dev->num_channels = ARRAY_SIZE(mma9553_channels);
11091108
indio_dev->name = name;

drivers/iio/adc/ad7192.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,6 @@ static int ad7192_probe(struct spi_device *spi)
970970

971971
spi_set_drvdata(spi, indio_dev);
972972
st->chip_info = of_device_get_match_data(&spi->dev);
973-
indio_dev->dev.parent = &spi->dev;
974973
indio_dev->name = st->chip_info->name;
975974
indio_dev->modes = INDIO_DIRECT_MODE;
976975

drivers/iio/adc/hx711.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,6 @@ static int hx711_probe(struct platform_device *pdev)
551551
platform_set_drvdata(pdev, indio_dev);
552552

553553
indio_dev->name = "hx711";
554-
indio_dev->dev.parent = &pdev->dev;
555554
indio_dev->info = &hx711_iio_info;
556555
indio_dev->modes = INDIO_DIRECT_MODE;
557556
indio_dev->channels = hx711_chan_spec;

drivers/iio/adc/ltc2497-core.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ int ltc2497core_probe(struct device *dev, struct iio_dev *indio_dev)
169169
struct ltc2497core_driverdata *ddata = iio_priv(indio_dev);
170170
int ret;
171171

172-
indio_dev->dev.parent = dev;
173172
indio_dev->name = dev_name(dev);
174173
indio_dev->info = &ltc2497core_info;
175174
indio_dev->modes = INDIO_DIRECT_MODE;

drivers/iio/adc/max1363.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1652,8 +1652,6 @@ static int max1363_probe(struct i2c_client *client,
16521652
if (ret)
16531653
goto error_disable_reg;
16541654

1655-
/* Establish that the iio_dev is a child of the i2c device */
1656-
indio_dev->dev.parent = &client->dev;
16571655
indio_dev->dev.of_node = client->dev.of_node;
16581656
indio_dev->name = id->name;
16591657
indio_dev->channels = st->chip_info->channels;

drivers/iio/adc/mcp3911.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ static int mcp3911_probe(struct spi_device *spi)
293293
if (ret)
294294
goto clk_disable;
295295

296-
indio_dev->dev.parent = &spi->dev;
297296
indio_dev->dev.of_node = spi->dev.of_node;
298297
indio_dev->name = spi_get_device_id(spi)->name;
299298
indio_dev->modes = INDIO_DIRECT_MODE;

drivers/iio/adc/qcom-spmi-iadc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,6 @@ static int iadc_probe(struct platform_device *pdev)
553553
return ret;
554554
}
555555

556-
indio_dev->dev.parent = dev;
557556
indio_dev->dev.of_node = node;
558557
indio_dev->name = pdev->name;
559558
indio_dev->modes = INDIO_DIRECT_MODE;

drivers/iio/amplifiers/ad8366.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ static int ad8366_probe(struct spi_device *spi)
277277
}
278278

279279
st->info = &ad8366_infos[st->type];
280-
indio_dev->dev.parent = &spi->dev;
281280
indio_dev->name = spi_get_device_id(spi)->name;
282281
indio_dev->info = &ad8366_info;
283282
indio_dev->modes = INDIO_DIRECT_MODE;

0 commit comments

Comments
 (0)