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 |
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 >
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 --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;