[PATCH v5 6/6] i2c: xiic: cosmetic cleanup
Andy Shevchenko
andriy.shevchenko at intel.com
Tue Jan 27 01:44:32 PST 2026
On Mon, Jan 26, 2026 at 05:08:21PM +0000, Abdurrahman Hussain via B4 Relay wrote:
> Re-use dev pointer instead of referencing &pdev->dev everywhere.
Reviewed-by: Andy Shevchenko <andriy.shevchenko at intel.com>
A couple of nit-picks to be addressed though.
...
> - i2c->dev = &pdev->dev;
> - pm_runtime_set_autosuspend_delay(i2c->dev, XIIC_PM_TIMEOUT);
> - pm_runtime_use_autosuspend(i2c->dev);
> + i2c->dev = dev;
+ blank line here.
> + pm_runtime_set_autosuspend_delay(dev, XIIC_PM_TIMEOUT);
> + pm_runtime_use_autosuspend(dev);
> ret = devm_pm_runtime_set_active_enabled(dev);
> if (ret < 0)
> return ret;
...
> ret = xiic_reinit(i2c);
> if (ret < 0) {
> - dev_err_probe(&pdev->dev, ret, "Cannot xiic_reinit\n");
> + dev_err_probe(dev, ret, "Cannot xiic_reinit\n");
> return ret;
> }
It should be integrated in the second patch or so, I have already commented on
that.
...
> - ret = pm_runtime_get_sync(i2c->dev);
> + ret = pm_runtime_get_sync(dev);
>
Drop this blank line as well.
> if (ret < 0)
> - dev_warn(&pdev->dev, "Failed to activate device for removal (%pe)\n",
> + dev_warn(dev, "Failed to activate device for removal (%pe)\n",
> ERR_PTR(ret));
> else
> xiic_deinit(i2c);
--
With Best Regards,
Andy Shevchenko
More information about the linux-arm-kernel
mailing list