Re: [PATCH v2 3/3] hwmon: ina3221: Add suspend and resume functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Sep 30, 2018 at 08:27:49AM -0700, Guenter Roeck wrote:

> >  static int ina3221_read_value(struct ina3221_data *ina, unsigned int reg,
> > @@ -415,9 +419,67 @@ static int ina3221_probe(struct i2c_client *client,
> >  		return PTR_ERR(hwmon_dev);
> >  	}
> >  
> > +	dev_set_drvdata(dev, ina);
> > +
> 
> It is better to call that function before registering the hwmon device,
> to avoid the theroretical possibility that suspend is called before drvdata
> is set. I moved the call accordingly.

Oh..I see. Another lesson learned. Thank you for the fix!



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux