mirror of
https://github.com/t2linux/kernel.git
synced 2026-04-30 13:48:59 -07:00
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 <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
committed by
Jonathan Cameron
parent
2c9d8e1a62
commit
8f73a13f74
@@ -1311,7 +1311,6 @@ static int kxcjk1013_probe(struct i2c_client *client,
|
||||
|
||||
mutex_init(&data->mutex);
|
||||
|
||||
indio_dev->dev.parent = &client->dev;
|
||||
indio_dev->channels = kxcjk1013_channels;
|
||||
indio_dev->num_channels = ARRAY_SIZE(kxcjk1013_channels);
|
||||
indio_dev->available_scan_masks = kxcjk1013_scan_masks;
|
||||
|
||||
@@ -1592,7 +1592,6 @@ static int mma8452_probe(struct i2c_client *client,
|
||||
i2c_set_clientdata(client, indio_dev);
|
||||
indio_dev->info = &mma8452_info;
|
||||
indio_dev->name = id->name;
|
||||
indio_dev->dev.parent = &client->dev;
|
||||
indio_dev->modes = INDIO_DIRECT_MODE;
|
||||
indio_dev->channels = data->chip_info->channels;
|
||||
indio_dev->num_channels = data->chip_info->num_channels;
|
||||
|
||||
@@ -1103,7 +1103,6 @@ static int mma9553_probe(struct i2c_client *client,
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
indio_dev->dev.parent = &client->dev;
|
||||
indio_dev->channels = mma9553_channels;
|
||||
indio_dev->num_channels = ARRAY_SIZE(mma9553_channels);
|
||||
indio_dev->name = name;
|
||||
|
||||
@@ -970,7 +970,6 @@ static int ad7192_probe(struct spi_device *spi)
|
||||
|
||||
spi_set_drvdata(spi, indio_dev);
|
||||
st->chip_info = of_device_get_match_data(&spi->dev);
|
||||
indio_dev->dev.parent = &spi->dev;
|
||||
indio_dev->name = st->chip_info->name;
|
||||
indio_dev->modes = INDIO_DIRECT_MODE;
|
||||
|
||||
|
||||
@@ -551,7 +551,6 @@ static int hx711_probe(struct platform_device *pdev)
|
||||
platform_set_drvdata(pdev, indio_dev);
|
||||
|
||||
indio_dev->name = "hx711";
|
||||
indio_dev->dev.parent = &pdev->dev;
|
||||
indio_dev->info = &hx711_iio_info;
|
||||
indio_dev->modes = INDIO_DIRECT_MODE;
|
||||
indio_dev->channels = hx711_chan_spec;
|
||||
|
||||
@@ -169,7 +169,6 @@ int ltc2497core_probe(struct device *dev, struct iio_dev *indio_dev)
|
||||
struct ltc2497core_driverdata *ddata = iio_priv(indio_dev);
|
||||
int ret;
|
||||
|
||||
indio_dev->dev.parent = dev;
|
||||
indio_dev->name = dev_name(dev);
|
||||
indio_dev->info = <c2497core_info;
|
||||
indio_dev->modes = INDIO_DIRECT_MODE;
|
||||
|
||||
@@ -1652,8 +1652,6 @@ static int max1363_probe(struct i2c_client *client,
|
||||
if (ret)
|
||||
goto error_disable_reg;
|
||||
|
||||
/* Establish that the iio_dev is a child of the i2c device */
|
||||
indio_dev->dev.parent = &client->dev;
|
||||
indio_dev->dev.of_node = client->dev.of_node;
|
||||
indio_dev->name = id->name;
|
||||
indio_dev->channels = st->chip_info->channels;
|
||||
|
||||
@@ -293,7 +293,6 @@ static int mcp3911_probe(struct spi_device *spi)
|
||||
if (ret)
|
||||
goto clk_disable;
|
||||
|
||||
indio_dev->dev.parent = &spi->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;
|
||||
|
||||
@@ -553,7 +553,6 @@ static int iadc_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
indio_dev->dev.parent = dev;
|
||||
indio_dev->dev.of_node = node;
|
||||
indio_dev->name = pdev->name;
|
||||
indio_dev->modes = INDIO_DIRECT_MODE;
|
||||
|
||||
@@ -277,7 +277,6 @@ static int ad8366_probe(struct spi_device *spi)
|
||||
}
|
||||
|
||||
st->info = &ad8366_infos[st->type];
|
||||
indio_dev->dev.parent = &spi->dev;
|
||||
indio_dev->name = spi_get_device_id(spi)->name;
|
||||
indio_dev->info = &ad8366_info;
|
||||
indio_dev->modes = INDIO_DIRECT_MODE;
|
||||
|
||||
@@ -152,7 +152,6 @@ static int atlas_ezo_probe(struct i2c_client *client,
|
||||
indio_dev->channels = chip->channels;
|
||||
indio_dev->num_channels = chip->num_channels;
|
||||
indio_dev->modes = INDIO_DIRECT_MODE;
|
||||
indio_dev->dev.parent = &client->dev;
|
||||
|
||||
data = iio_priv(indio_dev);
|
||||
data->client = client;
|
||||
|
||||
@@ -382,7 +382,6 @@ static int vz89x_probe(struct i2c_client *client,
|
||||
data->last_update = jiffies - HZ;
|
||||
mutex_init(&data->lock);
|
||||
|
||||
indio_dev->dev.parent = &client->dev;
|
||||
indio_dev->info = &vz89x_info;
|
||||
indio_dev->name = dev_name(&client->dev);
|
||||
indio_dev->modes = INDIO_DIRECT_MODE;
|
||||
|
||||
@@ -281,7 +281,6 @@ int cros_ec_sensors_core_init(struct platform_device *pdev,
|
||||
state->msg->command = EC_CMD_MOTION_SENSE_CMD + ec->cmd_offset;
|
||||
state->msg->outsize = sizeof(struct ec_params_motion_sense);
|
||||
|
||||
indio_dev->dev.parent = &pdev->dev;
|
||||
indio_dev->name = pdev->name;
|
||||
|
||||
if (physical_device) {
|
||||
|
||||
@@ -56,7 +56,6 @@ int st_sensors_i2c_configure(struct iio_dev *indio_dev,
|
||||
|
||||
i2c_set_clientdata(client, indio_dev);
|
||||
|
||||
indio_dev->dev.parent = &client->dev;
|
||||
indio_dev->name = client->name;
|
||||
|
||||
sdata->dev = &client->dev;
|
||||
|
||||
@@ -108,7 +108,6 @@ int st_sensors_spi_configure(struct iio_dev *indio_dev,
|
||||
|
||||
spi_set_drvdata(spi, indio_dev);
|
||||
|
||||
indio_dev->dev.parent = &spi->dev;
|
||||
indio_dev->name = spi->modalias;
|
||||
|
||||
sdata->dev = &spi->dev;
|
||||
|
||||
@@ -651,7 +651,6 @@ static int ad5770r_probe(struct spi_device *spi)
|
||||
}
|
||||
}
|
||||
|
||||
indio_dev->dev.parent = &spi->dev;
|
||||
indio_dev->name = spi_get_device_id(spi)->name;
|
||||
indio_dev->info = &ad5770r_info;
|
||||
indio_dev->modes = INDIO_DIRECT_MODE;
|
||||
|
||||
@@ -509,7 +509,6 @@ static int afe4403_probe(struct spi_device *spi)
|
||||
}
|
||||
|
||||
indio_dev->modes = INDIO_DIRECT_MODE;
|
||||
indio_dev->dev.parent = afe->dev;
|
||||
indio_dev->channels = afe4403_channels;
|
||||
indio_dev->num_channels = ARRAY_SIZE(afe4403_channels);
|
||||
indio_dev->name = AFE4403_DRIVER_NAME;
|
||||
|
||||
@@ -517,7 +517,6 @@ static int afe4404_probe(struct i2c_client *client,
|
||||
}
|
||||
|
||||
indio_dev->modes = INDIO_DIRECT_MODE;
|
||||
indio_dev->dev.parent = afe->dev;
|
||||
indio_dev->channels = afe4404_channels;
|
||||
indio_dev->num_channels = ARRAY_SIZE(afe4404_channels);
|
||||
indio_dev->name = AFE4404_DRIVER_NAME;
|
||||
|
||||
@@ -321,7 +321,6 @@ static int dht11_probe(struct platform_device *pdev)
|
||||
init_completion(&dht11->completion);
|
||||
mutex_init(&dht11->lock);
|
||||
iio->name = pdev->name;
|
||||
iio->dev.parent = &pdev->dev;
|
||||
iio->info = &dht11_iio_info;
|
||||
iio->modes = INDIO_DIRECT_MODE;
|
||||
iio->channels = dht11_chan_spec;
|
||||
|
||||
@@ -572,7 +572,6 @@ int hts221_probe(struct device *dev, int irq, const char *name,
|
||||
return err;
|
||||
|
||||
iio_dev->modes = INDIO_DIRECT_MODE;
|
||||
iio_dev->dev.parent = hw->dev;
|
||||
iio_dev->available_scan_masks = hts221_scan_masks;
|
||||
iio_dev->channels = hts221_channels;
|
||||
iio_dev->num_channels = ARRAY_SIZE(hts221_channels);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user