diff mbox series

[4/8] iio: adc: mt6360: Drop duplicate setting of iio_dev.dev.parent

Message ID 20210426170251.351957-5-jic23@kernel.org (mailing list archive)
State New, archived
Headers show
Series iio: cleanup some new instances of manual parent setting. | expand

Commit Message

Jonathan Cameron April 26, 2021, 5:02 p.m. UTC
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(-)

Comments

Alexandru Ardelean April 27, 2021, 7:25 a.m. UTC | #1
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
>
Jonathan Cameron April 27, 2021, 8:21 a.m. UTC | #2
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
> >
diff mbox series

Patch

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;