From: Jonathan Cameron <jic23@kernel.org>
To: Alison Schofield <amsfield22@gmail.com>
Cc: pgoudagunta@nvidia.com, knaack.h@gmx.de, lars@metafoo.de,
pmeerw@pmeerw.net, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: palmas_gpadc: retrieve a valid iio_dev in suspend/resume
Date: Sat, 21 Jan 2017 14:27:28 +0000 [thread overview]
Message-ID: <a1fdba51-d19d-3b66-26c6-6a585710962c@kernel.org> (raw)
In-Reply-To: <20170116192742.GA9521@d830.WORKGROUP>
On 16/01/17 19:27, Alison Schofield wrote:
> The suspend/resume functions were using dev_to_iio_dev() to get
> the iio_dev. That only works on IIO dev's. Use dev_get_drvdata()
> for a platform device to get the correct iio_dev.
>
> Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Applied to the fixes-togreg branch of iio.git and marked for stable.
Thanks,
Jonathan
> ---
> drivers/iio/adc/palmas_gpadc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/adc/palmas_gpadc.c b/drivers/iio/adc/palmas_gpadc.c
> index 2bbf0c5..7d61b56 100644
> --- a/drivers/iio/adc/palmas_gpadc.c
> +++ b/drivers/iio/adc/palmas_gpadc.c
> @@ -775,7 +775,7 @@ static int palmas_adc_wakeup_reset(struct palmas_gpadc *adc)
>
> static int palmas_gpadc_suspend(struct device *dev)
> {
> - struct iio_dev *indio_dev = dev_to_iio_dev(dev);
> + struct iio_dev *indio_dev = dev_get_drvdata(dev);
> struct palmas_gpadc *adc = iio_priv(indio_dev);
> int wakeup = adc->wakeup1_enable || adc->wakeup2_enable;
> int ret;
> @@ -798,7 +798,7 @@ static int palmas_gpadc_suspend(struct device *dev)
>
> static int palmas_gpadc_resume(struct device *dev)
> {
> - struct iio_dev *indio_dev = dev_to_iio_dev(dev);
> + struct iio_dev *indio_dev = dev_get_drvdata(dev);
> struct palmas_gpadc *adc = iio_priv(indio_dev);
> int wakeup = adc->wakeup1_enable || adc->wakeup2_enable;
> int ret;
>
prev parent reply other threads:[~2017-01-21 14:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-16 19:27 Alison Schofield
2017-01-21 14:27 ` Jonathan Cameron [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=a1fdba51-d19d-3b66-26c6-6a585710962c@kernel.org \
--to=jic23@kernel.org \
--cc=amsfield22@gmail.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pgoudagunta@nvidia.com \
--cc=pmeerw@pmeerw.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
all inboxes | Powered by JetHome®