Message ID | 20210426170251.351957-3-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> > > 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 >
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 > >
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;