Re: [PATCH v7 5/6] iio: adc: ad9467: simplify device pointer in probe
From: Andy Shevchenko
Date: Tue Feb 10 2026 - 10:01:24 EST
On Tue, Feb 10, 2026 at 10:53:38AM +0000, Tomas Melin wrote:
> Create alias for the device pointer to simplify referencing
> and keeping syntax and column width shorter.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
Some nit-picks in case it will be a new version or Jonathan will be keen to
tweak it.
...
> - st->pwrdown_gpio = devm_gpiod_get_optional(&spi->dev, "powerdown",
> + st->pwrdown_gpio = devm_gpiod_get_optional(dev, "powerdown",
> GPIOD_OUT_LOW);
I would dare to make it a single line.
> if (IS_ERR(st->pwrdown_gpio))
> return PTR_ERR(st->pwrdown_gpio);
...
> - dev_err(&spi->dev, "Mismatch CHIP_ID, got 0x%X, expected 0x%X\n",
> - id, st->info->id);
> + dev_err(dev, "Mismatch CHIP_ID, got 0x%X, expected 0x%X\n", id,
> + st->info->id);
I would not touch the second line as it makes a logical split.
--
With Best Regards,
Andy Shevchenko