aboutsummaryrefslogtreecommitdiff
path: root/drivers/iio/dac/ds4424.c
diff options
context:
space:
mode:
authorAlexandru Ardelean2020-05-22 11:22:05 +0300
committerJonathan Cameron2020-06-14 11:49:59 +0100
commitd3be83244c7dfe686d23f1c0bac75915587fc044 (patch)
tree4f3a62d66fb2bb21a430c2238c4301a1a23557d9 /drivers/iio/dac/ds4424.c
parentf5d017938e7a6517b85f7fd215213a28e11291fb (diff)
iio: remove explicit IIO device parent assignment
This patch applies the semantic patch: @@ expression I, P, SP; @@ I = devm_iio_device_alloc(P, SP); ... - I->dev.parent = P; It updates 302 files and does 307 deletions. This semantic patch also removes some comments like '/* Establish that the iio_dev is a child of the i2c device */' But this is is only done in case where the block is left empty. The patch does not seem to cover all cases. It looks like in some cases a different variable is used in some cases to assign the parent, but it points to the same reference. In other cases, the block covered by ... may be just too big to be covered by the semantic patch. However, this looks pretty good as well, as it does cover a big bulk of the drivers that should remove the parent assignment. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/dac/ds4424.c')
-rw-r--r--drivers/iio/dac/ds4424.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/iio/dac/ds4424.c b/drivers/iio/dac/ds4424.c
index 26d206681472..86eec0df1174 100644
--- a/drivers/iio/dac/ds4424.c
+++ b/drivers/iio/dac/ds4424.c
@@ -231,7 +231,6 @@ static int ds4424_probe(struct i2c_client *client,
data->client = client;
indio_dev->name = id->name;
indio_dev->dev.of_node = client->dev.of_node;
- indio_dev->dev.parent = &client->dev;
data->vcc_reg = devm_regulator_get(&client->dev, "vcc");
if (IS_ERR(data->vcc_reg)) {