Re: [PATCH v2 4/4] i2c: mv64xxx: use i2c_adapter_dev()

From: Andy Shevchenko

Date: Mon Feb 23 2026 - 06:38:12 EST


On Mon, Feb 23, 2026 at 10:23:40AM +0100, Bartosz Golaszewski wrote:
> On Mon, Feb 23, 2026 at 10:14 AM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> > On Mon, Feb 23, 2026 at 10:02:52AM +0100, Bartosz Golaszewski wrote:

...

> > > mv64xxx_i2c_xfer_core(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
> >
> > > struct mv64xxx_i2c_data *drv_data = i2c_get_adapdata(adap);
> > > int rc, ret = num;
> > >
> > > - rc = pm_runtime_resume_and_get(&adap->dev);
> > > + rc = pm_runtime_resume_and_get(i2c_adapter_dev(adap));
> > > if (rc)
> > > return rc;

...

> > > drv_data->num_msgs = 0;
> > > drv_data->msgs = NULL;
> > >
> > > - pm_runtime_put_autosuspend(&adap->dev);
> > > + pm_runtime_put_autosuspend(i2c_adapter_dev(adap));
> > >
> > > return ret;
> >
> > These two changes are in the same function, perhaps temporary variable
> > would be better?
>
> If all else is fine, maybe let's do it in a follow-up?

I gave already a tag, this is just a nit-pick / side note, it doesn't need
to be addressed on its own.

--
With Best Regards,
Andy Shevchenko