linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] iio: cleanup some new instances of manual parent setting.
@ 2021-04-26 17:02 Jonathan Cameron
  2021-04-26 17:02 ` [PATCH 1/8] iio: accel: bmi088: Drop manual assignment of iio_dev.dev.parent Jonathan Cameron
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Jonathan Cameron @ 2021-04-26 17:02 UTC (permalink / raw)
  To: linux-iio; +Cc: Alexandru Ardelean, Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

It seems I still haven't trained my eyes to spot these.

I think they have all been introduced since
iio_device_alloc() and friends started setting this
8525df47b3d1e ("iio: core: fix/re-introduce back parent assignment")
78289b4a58b58 ("iio: core: pass parent device as parameter during allocation")

Anyhow, all seem fairly obvious to me, but maybe I missed something so please
take a look.

Jonathan Cameron (8):
  iio: accel: bmi088: Drop manual assignment of iio_dev.dev.parent
  iio: dac: ad5766: Drop duplicate setting of iio_dev.dev.parent
  iio: adc: mp2629: Drop duplicate setting iio_dev.dev.parent
  iio: adc: mt6360: Drop duplicate setting of iio_dev.dev.parent
  iio: adc: ti-ads131e08: Drop duplicate setting of iio_dev.dev.parent
  iio: humidity: hdc2010: Drop duplicate setting of iio_dev.dev.parent
  iio: position: hid-sensor-custom-intel-hinge: Drop duplicate parent
    setting.
  iio: common: scmi_sensors: Drop duplicate setting of
    iio_dev.dev.parent

 drivers/iio/accel/bmi088-accel-core.c                | 1 -
 drivers/iio/adc/mp2629_adc.c                         | 1 -
 drivers/iio/adc/mt6360-adc.c                         | 1 -
 drivers/iio/adc/ti-ads131e08.c                       | 1 -
 drivers/iio/common/scmi_sensors/scmi_iio.c           | 1 -
 drivers/iio/dac/ad5766.c                             | 1 -
 drivers/iio/humidity/hdc2010.c                       | 1 -
 drivers/iio/position/hid-sensor-custom-intel-hinge.c | 1 -
 8 files changed, 8 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 1/8] iio: accel: bmi088: Drop manual assignment of iio_dev.dev.parent
  2021-04-26 17:02 [PATCH 0/8] iio: cleanup some new instances of manual parent setting Jonathan Cameron
@ 2021-04-26 17:02 ` Jonathan Cameron
  2021-04-26 17:02 ` [PATCH 2/8] iio: dac: ad5766: Drop duplicate setting " Jonathan Cameron
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Jonathan Cameron @ 2021-04-26 17:02 UTC (permalink / raw)
  To: linux-iio; +Cc: Alexandru Ardelean, Jonathan Cameron, Mike Looijmans

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

The core already set this to the same value in devm_iio_device_alloc()

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Mike Looijmans <mike.looijmans@topic.nl>
---
 drivers/iio/accel/bmi088-accel-core.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/iio/accel/bmi088-accel-core.c b/drivers/iio/accel/bmi088-accel-core.c
index 12d00658e46f..61aaaf48c040 100644
--- a/drivers/iio/accel/bmi088-accel-core.c
+++ b/drivers/iio/accel/bmi088-accel-core.c
@@ -496,7 +496,6 @@ int bmi088_accel_core_probe(struct device *dev, struct regmap *regmap,
 	if (ret)
 		return ret;
 
-	indio_dev->dev.parent = dev;
 	indio_dev->channels = data->chip_info->channels;
 	indio_dev->num_channels = data->chip_info->num_channels;
 	indio_dev->name = name ? name : data->chip_info->name;
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 2/8] iio: dac: ad5766: Drop duplicate setting of iio_dev.dev.parent
  2021-04-26 17:02 [PATCH 0/8] iio: cleanup some new instances of manual parent setting Jonathan Cameron
  2021-04-26 17:02 ` [PATCH 1/8] iio: accel: bmi088: Drop manual assignment of iio_dev.dev.parent Jonathan Cameron
@ 2021-04-26 17:02 ` Jonathan Cameron
  2021-04-27  7:26   ` Alexandru Ardelean
  2021-04-26 17:02 ` [PATCH 3/8] iio: adc: mp2629: Drop duplicate setting iio_dev.dev.parent Jonathan Cameron
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: Jonathan Cameron @ 2021-04-26 17:02 UTC (permalink / raw)
  To: linux-iio; +Cc: Alexandru Ardelean, Jonathan Cameron, Cristian Pop

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

This is set to the same value in devm_iio_device_alloc() so no need to do
it again.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Cristian Pop <cristian.pop@analog.com>
---
 drivers/iio/dac/ad5766.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/iio/dac/ad5766.c b/drivers/iio/dac/ad5766.c
index 79837a4b3a41..b0f180d46394 100644
--- a/drivers/iio/dac/ad5766.c
+++ b/drivers/iio/dac/ad5766.c
@@ -597,7 +597,6 @@ static int ad5766_probe(struct spi_device *spi)
 	indio_dev->channels = st->chip_info->channels;
 	indio_dev->num_channels = st->chip_info->num_channels;
 	indio_dev->info = &ad5766_info;
-	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;
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 3/8] iio: adc: mp2629: Drop duplicate setting iio_dev.dev.parent
  2021-04-26 17:02 [PATCH 0/8] iio: cleanup some new instances of manual parent setting Jonathan Cameron
  2021-04-26 17:02 ` [PATCH 1/8] iio: accel: bmi088: Drop manual assignment of iio_dev.dev.parent Jonathan Cameron
  2021-04-26 17:02 ` [PATCH 2/8] iio: dac: ad5766: Drop duplicate setting " Jonathan Cameron
@ 2021-04-26 17:02 ` Jonathan Cameron
  2021-04-26 17:02 ` [PATCH 4/8] iio: adc: mt6360: Drop duplicate setting of iio_dev.dev.parent Jonathan Cameron
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Jonathan Cameron @ 2021-04-26 17:02 UTC (permalink / raw)
  To: linux-iio; +Cc: Alexandru Ardelean, Jonathan Cameron, Saravanan Sekar

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

This is already set to the same value in devm_iio_device_alloc()

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Saravanan Sekar <sravanhome@gmail.com>
---
 drivers/iio/adc/mp2629_adc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/iio/adc/mp2629_adc.c b/drivers/iio/adc/mp2629_adc.c
index 331a9a728217..aca084f1e78a 100644
--- a/drivers/iio/adc/mp2629_adc.c
+++ b/drivers/iio/adc/mp2629_adc.c
@@ -144,7 +144,6 @@ static int mp2629_adc_probe(struct platform_device *pdev)
 	}
 
 	indio_dev->name = "mp2629-adc";
-	indio_dev->dev.parent = dev;
 	indio_dev->channels = mp2629_channels;
 	indio_dev->num_channels = ARRAY_SIZE(mp2629_channels);
 	indio_dev->modes = INDIO_DIRECT_MODE;
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 4/8] iio: adc: mt6360: Drop duplicate setting of iio_dev.dev.parent
  2021-04-26 17:02 [PATCH 0/8] iio: cleanup some new instances of manual parent setting Jonathan Cameron
                   ` (2 preceding siblings ...)
  2021-04-26 17:02 ` [PATCH 3/8] iio: adc: mp2629: Drop duplicate setting iio_dev.dev.parent Jonathan Cameron
@ 2021-04-26 17:02 ` Jonathan Cameron
  2021-04-27  7:25   ` Alexandru Ardelean
  2021-04-26 17:02 ` [PATCH 5/8] iio: adc: ti-ads131e08: " Jonathan Cameron
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: Jonathan Cameron @ 2021-04-26 17:02 UTC (permalink / raw)
  To: linux-iio; +Cc: Alexandru Ardelean, Jonathan Cameron, Gene Chen

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Already set to the same value in devm_iio_device_alloc()

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Gene Chen <gene_chen@richtek.com>
---
 drivers/iio/adc/mt6360-adc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/iio/adc/mt6360-adc.c b/drivers/iio/adc/mt6360-adc.c
index 6b39a139ce28..07c0e6768391 100644
--- a/drivers/iio/adc/mt6360-adc.c
+++ b/drivers/iio/adc/mt6360-adc.c
@@ -337,7 +337,6 @@ static int mt6360_adc_probe(struct platform_device *pdev)
 	}
 
 	indio_dev->name = dev_name(&pdev->dev);
-	indio_dev->dev.parent = &pdev->dev;
 	indio_dev->info = &mt6360_adc_iio_info;
 	indio_dev->modes = INDIO_DIRECT_MODE;
 	indio_dev->channels = mt6360_adc_channels;
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 5/8] iio: adc: ti-ads131e08: Drop duplicate setting of iio_dev.dev.parent
  2021-04-26 17:02 [PATCH 0/8] iio: cleanup some new instances of manual parent setting Jonathan Cameron
                   ` (3 preceding siblings ...)
  2021-04-26 17:02 ` [PATCH 4/8] iio: adc: mt6360: Drop duplicate setting of iio_dev.dev.parent Jonathan Cameron
@ 2021-04-26 17:02 ` Jonathan Cameron
  2021-04-26 17:02 ` [PATCH 6/8] iio: humidity: hdc2010: " Jonathan Cameron
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Jonathan Cameron @ 2021-04-26 17:02 UTC (permalink / raw)
  To: linux-iio; +Cc: Alexandru Ardelean, Jonathan Cameron, Tomislav Denis

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Already set to same value in devm_iio_device_alloc()

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Tomislav Denis <tomislav.denis@avl.com>
---
 drivers/iio/adc/ti-ads131e08.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/iio/adc/ti-ads131e08.c b/drivers/iio/adc/ti-ads131e08.c
index 5dcf1e9294d7..d220eef5c0df 100644
--- a/drivers/iio/adc/ti-ads131e08.c
+++ b/drivers/iio/adc/ti-ads131e08.c
@@ -824,7 +824,6 @@ static int ads131e08_probe(struct spi_device *spi)
 		return ret;
 
 	indio_dev->name = st->info->name;
-	indio_dev->dev.parent = &spi->dev;
 	indio_dev->info = &ads131e08_iio_info;
 	indio_dev->modes = INDIO_DIRECT_MODE;
 
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 6/8] iio: humidity: hdc2010: Drop duplicate setting of iio_dev.dev.parent
  2021-04-26 17:02 [PATCH 0/8] iio: cleanup some new instances of manual parent setting Jonathan Cameron
                   ` (4 preceding siblings ...)
  2021-04-26 17:02 ` [PATCH 5/8] iio: adc: ti-ads131e08: " Jonathan Cameron
@ 2021-04-26 17:02 ` Jonathan Cameron
  2021-04-26 17:02 ` [PATCH 7/8] iio: position: hid-sensor-custom-intel-hinge: Drop duplicate parent setting Jonathan Cameron
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Jonathan Cameron @ 2021-04-26 17:02 UTC (permalink / raw)
  To: linux-iio; +Cc: Alexandru Ardelean, Jonathan Cameron, Eugene Zaikonnikov

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Already set to same value in devm_iio_device_alloc()

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Eugene Zaikonnikov <ez@norphonic.com>
---
 drivers/iio/humidity/hdc2010.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/iio/humidity/hdc2010.c b/drivers/iio/humidity/hdc2010.c
index 83f5b9f60780..1381df46187c 100644
--- a/drivers/iio/humidity/hdc2010.c
+++ b/drivers/iio/humidity/hdc2010.c
@@ -272,7 +272,6 @@ static int hdc2010_probe(struct i2c_client *client,
 	data->client = client;
 	mutex_init(&data->lock);
 
-	indio_dev->dev.parent = &client->dev;
 	/*
 	 * As DEVICE ID register does not differentiate between
 	 * HDC2010 and HDC2080, we have the name hardcoded
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 7/8] iio: position: hid-sensor-custom-intel-hinge: Drop duplicate parent setting.
  2021-04-26 17:02 [PATCH 0/8] iio: cleanup some new instances of manual parent setting Jonathan Cameron
                   ` (5 preceding siblings ...)
  2021-04-26 17:02 ` [PATCH 6/8] iio: humidity: hdc2010: " Jonathan Cameron
@ 2021-04-26 17:02 ` Jonathan Cameron
  2021-04-26 17:02 ` [PATCH 8/8] iio: common: scmi_sensors: Drop duplicate setting of iio_dev.dev.parent Jonathan Cameron
  2021-04-27  7:27 ` [PATCH 0/8] iio: cleanup some new instances of manual parent setting Alexandru Ardelean
  8 siblings, 0 replies; 15+ messages in thread
From: Jonathan Cameron @ 2021-04-26 17:02 UTC (permalink / raw)
  To: linux-iio; +Cc: Alexandru Ardelean, Jonathan Cameron, Ye Xiang

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

iio_dev.dev.parent is already set to the same value in
devm_iio_device_alloc()

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Ye Xiang <xiang.ye@intel.com>
---
 drivers/iio/position/hid-sensor-custom-intel-hinge.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/iio/position/hid-sensor-custom-intel-hinge.c b/drivers/iio/position/hid-sensor-custom-intel-hinge.c
index fd77e7ee87f3..738b5f4626ce 100644
--- a/drivers/iio/position/hid-sensor-custom-intel-hinge.c
+++ b/drivers/iio/position/hid-sensor-custom-intel-hinge.c
@@ -303,7 +303,6 @@ static int hid_hinge_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	indio_dev->dev.parent = &pdev->dev;
 	indio_dev->info = &hinge_info;
 	indio_dev->name = "hinge";
 	indio_dev->modes = INDIO_DIRECT_MODE;
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 8/8] iio: common: scmi_sensors: Drop duplicate setting of iio_dev.dev.parent
  2021-04-26 17:02 [PATCH 0/8] iio: cleanup some new instances of manual parent setting Jonathan Cameron
                   ` (6 preceding siblings ...)
  2021-04-26 17:02 ` [PATCH 7/8] iio: position: hid-sensor-custom-intel-hinge: Drop duplicate parent setting Jonathan Cameron
@ 2021-04-26 17:02 ` Jonathan Cameron
  2021-04-27  7:27 ` [PATCH 0/8] iio: cleanup some new instances of manual parent setting Alexandru Ardelean
  8 siblings, 0 replies; 15+ messages in thread
From: Jonathan Cameron @ 2021-04-26 17:02 UTC (permalink / raw)
  To: linux-iio; +Cc: Alexandru Ardelean, Jonathan Cameron, Jyoti Bhayana

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

This is already set to the same value in devm_iio_device_alloc()

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Jyoti Bhayana <jbhayana@google.com>
---
 drivers/iio/common/scmi_sensors/scmi_iio.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/iio/common/scmi_sensors/scmi_iio.c b/drivers/iio/common/scmi_sensors/scmi_iio.c
index 63e4cec9de5e..16f0526ff01a 100644
--- a/drivers/iio/common/scmi_sensors/scmi_iio.c
+++ b/drivers/iio/common/scmi_sensors/scmi_iio.c
@@ -544,7 +544,6 @@ static struct iio_dev *scmi_alloc_iiodev(struct device *dev,
 		return ERR_PTR(-ENOMEM);
 
 	iiodev->modes = INDIO_DIRECT_MODE;
-	iiodev->dev.parent = dev;
 	sensor = iio_priv(iiodev);
 	sensor->handle = handle;
 	sensor->sensor_info = sensor_info;
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH 4/8] iio: adc: mt6360: Drop duplicate setting of iio_dev.dev.parent
  2021-04-26 17:02 ` [PATCH 4/8] iio: adc: mt6360: Drop duplicate setting of iio_dev.dev.parent Jonathan Cameron
@ 2021-04-27  7:25   ` Alexandru Ardelean
  2021-04-27  8:21     ` Jonathan Cameron
  0 siblings, 1 reply; 15+ messages in thread
From: Alexandru Ardelean @ 2021-04-27  7:25 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio, Jonathan Cameron, Gene Chen

On Mon, Apr 26, 2021 at 8:04 PM Jonathan Cameron <jic23@kernel.org> wrote:
>
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> Already set to the same value in devm_iio_device_alloc()
>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Gene Chen <gene_chen@richtek.com>
> ---
>  drivers/iio/adc/mt6360-adc.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/iio/adc/mt6360-adc.c b/drivers/iio/adc/mt6360-adc.c
> index 6b39a139ce28..07c0e6768391 100644
> --- a/drivers/iio/adc/mt6360-adc.c
> +++ b/drivers/iio/adc/mt6360-adc.c
> @@ -337,7 +337,6 @@ static int mt6360_adc_probe(struct platform_device *pdev)
>         }
>
>         indio_dev->name = dev_name(&pdev->dev);

unrelated to this series, this dev_name(&pdev->dev) looks a bit weird;
this should resolve to the driver name AFAICT; which is "mt6360-adc"
it feels a bit off with respect to ABI; but maybe it's too late to change it?

> -       indio_dev->dev.parent = &pdev->dev;
>         indio_dev->info = &mt6360_adc_iio_info;
>         indio_dev->modes = INDIO_DIRECT_MODE;
>         indio_dev->channels = mt6360_adc_channels;
> --
> 2.31.1
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 2/8] iio: dac: ad5766: Drop duplicate setting of iio_dev.dev.parent
  2021-04-26 17:02 ` [PATCH 2/8] iio: dac: ad5766: Drop duplicate setting " Jonathan Cameron
@ 2021-04-27  7:26   ` Alexandru Ardelean
  2021-04-27 17:13     ` Jonathan Cameron
  0 siblings, 1 reply; 15+ messages in thread
From: Alexandru Ardelean @ 2021-04-27  7:26 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio, Jonathan Cameron, Cristian Pop

On Mon, Apr 26, 2021 at 8:04 PM Jonathan Cameron <jic23@kernel.org> wrote:
>
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> This is set to the same value in devm_iio_device_alloc() so no need to do
> it again.
>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Cristian Pop <cristian.pop@analog.com>
> ---
>  drivers/iio/dac/ad5766.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/iio/dac/ad5766.c b/drivers/iio/dac/ad5766.c
> index 79837a4b3a41..b0f180d46394 100644
> --- a/drivers/iio/dac/ad5766.c
> +++ b/drivers/iio/dac/ad5766.c
> @@ -597,7 +597,6 @@ static int ad5766_probe(struct spi_device *spi)
>         indio_dev->channels = st->chip_info->channels;
>         indio_dev->num_channels = st->chip_info->num_channels;
>         indio_dev->info = &ad5766_info;
> -       indio_dev->dev.parent = &spi->dev;
>         indio_dev->dev.of_node = spi->dev.of_node;

Unrelated to this series.
This looks like it could do without the of_node assignment as well.

I probably should have noticed this earlier.

>         indio_dev->name = spi_get_device_id(spi)->name;
>         indio_dev->modes = INDIO_DIRECT_MODE;
> --
> 2.31.1
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/8] iio: cleanup some new instances of manual parent setting.
  2021-04-26 17:02 [PATCH 0/8] iio: cleanup some new instances of manual parent setting Jonathan Cameron
                   ` (7 preceding siblings ...)
  2021-04-26 17:02 ` [PATCH 8/8] iio: common: scmi_sensors: Drop duplicate setting of iio_dev.dev.parent Jonathan Cameron
@ 2021-04-27  7:27 ` Alexandru Ardelean
  2021-05-03 11:37   ` Jonathan Cameron
  8 siblings, 1 reply; 15+ messages in thread
From: Alexandru Ardelean @ 2021-04-27  7:27 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio, Jonathan Cameron

On Mon, Apr 26, 2021 at 8:04 PM Jonathan Cameron <jic23@kernel.org> wrote:
>
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> It seems I still haven't trained my eyes to spot these.
>
> I think they have all been introduced since
> iio_device_alloc() and friends started setting this
> 8525df47b3d1e ("iio: core: fix/re-introduce back parent assignment")
> 78289b4a58b58 ("iio: core: pass parent device as parameter during allocation")
>
> Anyhow, all seem fairly obvious to me, but maybe I missed something so please
> take a look.

I've added 2 comments that are unrelated [directly] to this series.

Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com>

>
> Jonathan Cameron (8):
>   iio: accel: bmi088: Drop manual assignment of iio_dev.dev.parent
>   iio: dac: ad5766: Drop duplicate setting of iio_dev.dev.parent
>   iio: adc: mp2629: Drop duplicate setting iio_dev.dev.parent
>   iio: adc: mt6360: Drop duplicate setting of iio_dev.dev.parent
>   iio: adc: ti-ads131e08: Drop duplicate setting of iio_dev.dev.parent
>   iio: humidity: hdc2010: Drop duplicate setting of iio_dev.dev.parent
>   iio: position: hid-sensor-custom-intel-hinge: Drop duplicate parent
>     setting.
>   iio: common: scmi_sensors: Drop duplicate setting of
>     iio_dev.dev.parent
>
>  drivers/iio/accel/bmi088-accel-core.c                | 1 -
>  drivers/iio/adc/mp2629_adc.c                         | 1 -
>  drivers/iio/adc/mt6360-adc.c                         | 1 -
>  drivers/iio/adc/ti-ads131e08.c                       | 1 -
>  drivers/iio/common/scmi_sensors/scmi_iio.c           | 1 -
>  drivers/iio/dac/ad5766.c                             | 1 -
>  drivers/iio/humidity/hdc2010.c                       | 1 -
>  drivers/iio/position/hid-sensor-custom-intel-hinge.c | 1 -
>  8 files changed, 8 deletions(-)
>
> --
> 2.31.1
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 4/8] iio: adc: mt6360: Drop duplicate setting of iio_dev.dev.parent
  2021-04-27  7:25   ` Alexandru Ardelean
@ 2021-04-27  8:21     ` Jonathan Cameron
  0 siblings, 0 replies; 15+ messages in thread
From: Jonathan Cameron @ 2021-04-27  8:21 UTC (permalink / raw)
  To: Alexandru Ardelean; +Cc: Jonathan Cameron, linux-iio, Gene Chen

On Tue, 27 Apr 2021 10:25:05 +0300
Alexandru Ardelean <ardeleanalex@gmail.com> wrote:

> On Mon, Apr 26, 2021 at 8:04 PM Jonathan Cameron <jic23@kernel.org> wrote:
> >
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> >
> > Already set to the same value in devm_iio_device_alloc()
> >
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Gene Chen <gene_chen@richtek.com>
> > ---
> >  drivers/iio/adc/mt6360-adc.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/iio/adc/mt6360-adc.c b/drivers/iio/adc/mt6360-adc.c
> > index 6b39a139ce28..07c0e6768391 100644
> > --- a/drivers/iio/adc/mt6360-adc.c
> > +++ b/drivers/iio/adc/mt6360-adc.c
> > @@ -337,7 +337,6 @@ static int mt6360_adc_probe(struct platform_device *pdev)
> >         }
> >
> >         indio_dev->name = dev_name(&pdev->dev);  
> 
> unrelated to this series, this dev_name(&pdev->dev) looks a bit weird;
> this should resolve to the driver name AFAICT; which is "mt6360-adc"
> it feels a bit off with respect to ABI; but maybe it's too late to change it?
Yup. We have some historical ones of these unfortunately when I wasn't
paying attention properly.  They are ABI for those parts now so
we can't fix them without significant risk of breaking someones platform.

Jonathan

> 
> > -       indio_dev->dev.parent = &pdev->dev;
> >         indio_dev->info = &mt6360_adc_iio_info;
> >         indio_dev->modes = INDIO_DIRECT_MODE;
> >         indio_dev->channels = mt6360_adc_channels;
> > --
> > 2.31.1
> >  


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 2/8] iio: dac: ad5766: Drop duplicate setting of iio_dev.dev.parent
  2021-04-27  7:26   ` Alexandru Ardelean
@ 2021-04-27 17:13     ` Jonathan Cameron
  0 siblings, 0 replies; 15+ messages in thread
From: Jonathan Cameron @ 2021-04-27 17:13 UTC (permalink / raw)
  To: Alexandru Ardelean; +Cc: linux-iio, Jonathan Cameron, Cristian Pop

On Tue, 27 Apr 2021 10:26:31 +0300
Alexandru Ardelean <ardeleanalex@gmail.com> wrote:

> On Mon, Apr 26, 2021 at 8:04 PM Jonathan Cameron <jic23@kernel.org> wrote:
> >
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> >
> > This is set to the same value in devm_iio_device_alloc() so no need to do
> > it again.
> >
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Cristian Pop <cristian.pop@analog.com>
> > ---
> >  drivers/iio/dac/ad5766.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/iio/dac/ad5766.c b/drivers/iio/dac/ad5766.c
> > index 79837a4b3a41..b0f180d46394 100644
> > --- a/drivers/iio/dac/ad5766.c
> > +++ b/drivers/iio/dac/ad5766.c
> > @@ -597,7 +597,6 @@ static int ad5766_probe(struct spi_device *spi)
> >         indio_dev->channels = st->chip_info->channels;
> >         indio_dev->num_channels = st->chip_info->num_channels;
> >         indio_dev->info = &ad5766_info;
> > -       indio_dev->dev.parent = &spi->dev;
> >         indio_dev->dev.of_node = spi->dev.of_node;  
> 
> Unrelated to this series.
> This looks like it could do without the of_node assignment as well.
> 
> I probably should have noticed this earlier.

Good point.  Rather than having a separate patch I'll pull that in here
whilst applying if no one shouts.

Thanks,

Jonathan

> 
> >         indio_dev->name = spi_get_device_id(spi)->name;
> >         indio_dev->modes = INDIO_DIRECT_MODE;
> > --
> > 2.31.1
> >  


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/8] iio: cleanup some new instances of manual parent setting.
  2021-04-27  7:27 ` [PATCH 0/8] iio: cleanup some new instances of manual parent setting Alexandru Ardelean
@ 2021-05-03 11:37   ` Jonathan Cameron
  0 siblings, 0 replies; 15+ messages in thread
From: Jonathan Cameron @ 2021-05-03 11:37 UTC (permalink / raw)
  To: Alexandru Ardelean; +Cc: linux-iio, Jonathan Cameron

On Tue, 27 Apr 2021 10:27:44 +0300
Alexandru Ardelean <ardeleanalex@gmail.com> wrote:

> On Mon, Apr 26, 2021 at 8:04 PM Jonathan Cameron <jic23@kernel.org> wrote:
> >
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> >
> > It seems I still haven't trained my eyes to spot these.
> >
> > I think they have all been introduced since
> > iio_device_alloc() and friends started setting this
> > 8525df47b3d1e ("iio: core: fix/re-introduce back parent assignment")
> > 78289b4a58b58 ("iio: core: pass parent device as parameter during allocation")
> >
> > Anyhow, all seem fairly obvious to me, but maybe I missed something so please
> > take a look.  
> 
> I've added 2 comments that are unrelated [directly] to this series.
> 
> Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com>

Thanks for checking these.  I've added the of_node dropping bit
to the patch you pointed that out in.

Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to poke at it and see if we missed anything!

Thanks,

Jonathan

> 
> >
> > Jonathan Cameron (8):
> >   iio: accel: bmi088: Drop manual assignment of iio_dev.dev.parent
> >   iio: dac: ad5766: Drop duplicate setting of iio_dev.dev.parent
> >   iio: adc: mp2629: Drop duplicate setting iio_dev.dev.parent
> >   iio: adc: mt6360: Drop duplicate setting of iio_dev.dev.parent
> >   iio: adc: ti-ads131e08: Drop duplicate setting of iio_dev.dev.parent
> >   iio: humidity: hdc2010: Drop duplicate setting of iio_dev.dev.parent
> >   iio: position: hid-sensor-custom-intel-hinge: Drop duplicate parent
> >     setting.
> >   iio: common: scmi_sensors: Drop duplicate setting of
> >     iio_dev.dev.parent
> >
> >  drivers/iio/accel/bmi088-accel-core.c                | 1 -
> >  drivers/iio/adc/mp2629_adc.c                         | 1 -
> >  drivers/iio/adc/mt6360-adc.c                         | 1 -
> >  drivers/iio/adc/ti-ads131e08.c                       | 1 -
> >  drivers/iio/common/scmi_sensors/scmi_iio.c           | 1 -
> >  drivers/iio/dac/ad5766.c                             | 1 -
> >  drivers/iio/humidity/hdc2010.c                       | 1 -
> >  drivers/iio/position/hid-sensor-custom-intel-hinge.c | 1 -
> >  8 files changed, 8 deletions(-)
> >
> > --
> > 2.31.1
> >  


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-05-03 11:36 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-26 17:02 [PATCH 0/8] iio: cleanup some new instances of manual parent setting Jonathan Cameron
2021-04-26 17:02 ` [PATCH 1/8] iio: accel: bmi088: Drop manual assignment of iio_dev.dev.parent Jonathan Cameron
2021-04-26 17:02 ` [PATCH 2/8] iio: dac: ad5766: Drop duplicate setting " Jonathan Cameron
2021-04-27  7:26   ` Alexandru Ardelean
2021-04-27 17:13     ` Jonathan Cameron
2021-04-26 17:02 ` [PATCH 3/8] iio: adc: mp2629: Drop duplicate setting iio_dev.dev.parent Jonathan Cameron
2021-04-26 17:02 ` [PATCH 4/8] iio: adc: mt6360: Drop duplicate setting of iio_dev.dev.parent Jonathan Cameron
2021-04-27  7:25   ` Alexandru Ardelean
2021-04-27  8:21     ` Jonathan Cameron
2021-04-26 17:02 ` [PATCH 5/8] iio: adc: ti-ads131e08: " Jonathan Cameron
2021-04-26 17:02 ` [PATCH 6/8] iio: humidity: hdc2010: " Jonathan Cameron
2021-04-26 17:02 ` [PATCH 7/8] iio: position: hid-sensor-custom-intel-hinge: Drop duplicate parent setting Jonathan Cameron
2021-04-26 17:02 ` [PATCH 8/8] iio: common: scmi_sensors: Drop duplicate setting of iio_dev.dev.parent Jonathan Cameron
2021-04-27  7:27 ` [PATCH 0/8] iio: cleanup some new instances of manual parent setting Alexandru Ardelean
2021-05-03 11:37   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).