From: Nicolin Chen <nicoleotsuka@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: jdelvare@suse.com, afd@ti.com, linux-hwmon@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] hwmon: ina3221: Add suspend and resume functions
Date: Sun, 30 Sep 2018 20:15:35 -0700 [thread overview]
Message-ID: <20181001031534.GA4428@Asurada> (raw)
In-Reply-To: <20180930152749.GA16746@roeck-us.net>
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!
prev parent reply other threads:[~2018-10-01 3:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-29 21:44 [PATCH v2 0/3] Add suspend and resume functions Nicolin Chen
2018-09-29 21:44 ` [PATCH v2 1/3] hwmon: ina3221: Add INA3221_CONFIG to volatile_table Nicolin Chen
2018-09-30 15:00 ` Guenter Roeck
2018-09-29 21:44 ` [PATCH v2 2/3] hwmon: ina3221: Fix INA3221_CONFIG_MODE macros Nicolin Chen
2018-09-30 15:01 ` Guenter Roeck
2018-09-29 21:44 ` [PATCH v2 3/3] hwmon: ina3221: Add suspend and resume functions Nicolin Chen
2018-09-30 15:27 ` Guenter Roeck
2018-10-01 3:15 ` Nicolin Chen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181001031534.GA4428@Asurada \
--to=nicoleotsuka@gmail.com \
--cc=afd@ti.com \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox