Re: [PATCH v5 3/6] iio: adc: mcp3911: simplify usage of spi->dev

Andy Shevchenko
2023-08-15T14:54:32Z

On Mon, Aug 14, 2023 at 02:10:07PM +0200, Marcus Folkesson wrote:
> Replace the usage of `adc->spi->dev` with `dev` to make the code prettier.

...

> u32 ref = MCP3911_INT_VREF_MV;
> + struct device *dev = &adc->spi->dev;

Keep it upper.

> u32 div;
> int ret;
> u64 tmp;

...

> + ret = devm_iio_triggered_buffer_setup(dev, indio_dev,
> + NULL,

This can be moved to the upper line.

> + mcp3911_trigger_handler, NULL);
> if (ret)
> return ret;

...

With above addressed,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

--
With Best Regards,
Andy Shevchenko