Re: [PATCH v3 07/10] iio: accel: mma8452: use local struct device
From: Andy Shevchenko
Date: Wed May 06 2026 - 05:34:36 EST
On Tue, May 05, 2026 at 11:16:37PM +0530, Sanjay Chitroda wrote:
> Introduce a local struct device pointer derived from &client->dev.
> This avoids repeated &client->dev usage and improves readability.
...
> data->chip_info = i2c_get_match_data(client);
> if (!data->chip_info)
> - return dev_err_probe(&client->dev, -ENODEV,
> + return dev_err_probe(dev, -ENODEV,
> "unknown device model\n");
Now it's a single line.
...
> + pm_runtime_set_autosuspend_delay(dev,
> MMA8452_AUTO_SUSPEND_DELAY_MS);
Ditto.
--
With Best Regards,
Andy Shevchenko