Re: [PATCH 1/6] iio: health: afe4403: Do not store dev pointer in device struct

From: Andy Shevchenko
Date: Wed Aug 20 2025 - 10:46:55 EST


On Wed, Aug 13, 2025 at 05:58:35PM -0500, Andrew Davis wrote:
> The device *dev is only used in probe(), so no need to store it
> in the device local data struct. In all the places in probe()
> we did use that, just use a new local variable for the same.

...

> - afe->trig = devm_iio_trigger_alloc(afe->dev,
> + afe->trig = devm_iio_trigger_alloc(dev,
> "%s-dev%d",

It can be made one line less, but it's already applied...

> indio_dev->name,
> iio_device_id(indio_dev));
> if (!afe->trig) {
> - dev_err(afe->dev, "Unable to allocate IIO trigger\n");
> + dev_err(dev, "Unable to allocate IIO trigger\n");
> return -ENOMEM;
> }

--
With Best Regards,
Andy Shevchenko