Re: [PATCH v7 5/9] iio: ssp_sensors: use local struct device

Jonathan Cameron
2026-04-26T14:17:01Z

On Sun, 26 Apr 2026 14:47:06 +0530
Sanjay Chitroda <sanjayembeddedse@gmail.com> wrote:

> From: Sanjay Chitroda <sanjayembeddedse@gmail.com>
>
> Introduce a struct device *dev derived from &spi->dev to improve
> readability and reorder variable(s) to follow reversed xmas tree style.
It's really minor reordering but generally I'd not do that in a patch
that does anything else. So here I'd have put the new variables
in as close to correct location as possible, then followed with
a reorder if it was worth the churn that results. I'm not sure it is
in this particular case.

>
> Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>

> @@ -579,9 +580,9 @@ static int ssp_probe(struct spi_device *spi)
> mutex_destroy(&data->pending_lock);
> mutex_destroy(&data->comm_lock);
> err_setup_spi:
> - mfd_remove_devices(&spi->dev);
> + mfd_remove_devices(dev);
>
> - dev_err(&spi->dev, "Probe failed!\n");
> + dev_err(dev, "Probe failed!\n");

Drop this one. It's easy to find out if a driver probe succeeded
so we don't need a print for it given meaningful errors generated
messages anyway.

>
> return ret;
> }