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

From: Jonathan Cameron

Date: Sun Apr 26 2026 - 10:17:08 EST


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

> From: Sanjay Chitroda <sanjayembeddedse@xxxxxxxxx>
>
> 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@xxxxxxxxx>

> @@ -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;
> }