RE: [PATCH] i2c: imx: correct the method of getting private data in notifier_call

From: Aisheng Dong
Date: Tue Apr 16 2019 - 23:17:17 EST


[...]

> >
> > Fixes: 90ad2cbe88c2("i2c: imx: use clk notifier for rate changes")
> > Signed-off-by: Anson Huang <Anson.Huang@xxxxxxx>
>
> Please also provide how to reproduce it.
> And it seems not a new issue, should we CC stable?

Besides above comments:

Reviewed-by: Dong Aisheng <aisheng.dong@xxxxxxx>

Regards
Dong Aisheng

>
> Regards
> Dong Aisheng
>
> > ---
> > drivers/i2c/busses/i2c-imx.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/i2c/busses/i2c-imx.c
> > b/drivers/i2c/busses/i2c-imx.c index
> > c0c3043..fd70b11 100644
> > --- a/drivers/i2c/busses/i2c-imx.c
> > +++ b/drivers/i2c/busses/i2c-imx.c
> > @@ -515,9 +515,9 @@ static int i2c_imx_clk_notifier_call(struct
> > notifier_block *nb,
> > unsigned long action, void *data) {
> > struct clk_notifier_data *ndata = data;
> > - struct imx_i2c_struct *i2c_imx = container_of(&ndata->clk,
> > + struct imx_i2c_struct *i2c_imx = container_of(nb,
> > struct imx_i2c_struct,
> > - clk);
> > + clk_change_nb);
> >
> > if (action & POST_RATE_CHANGE)
> > i2c_imx_set_clk(i2c_imx, ndata->new_rate);
> > --
> > 2.7.4