All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Hans de Goede <hdegoede@redhat.com>
Cc: "Chen, Hu" <hu1.chen@intel.com>,
	bo.he@intel.com, Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Stephan Gerhold <stephan@gerhold.net>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] io: accel: kxcjk1013: restore the range after resume.
Date: Sat, 9 Mar 2019 17:32:11 +0000	[thread overview]
Message-ID: <20190309173211.00c205e3@archlinux> (raw)
In-Reply-To: <cac7810e-04df-8aca-fbd9-2433b544960c@redhat.com>

On Wed, 6 Mar 2019 09:43:24 +0100
Hans de Goede <hdegoede@redhat.com> wrote:

> Hi,
> 
> On 06-03-19 03:32, Chen, Hu wrote:
> > From: "he, bo" <bo.he@intel.com>
> > 
> > On some laptops, kxcjk1013 is powered off when system enters S3. We need
> > restore the range regiter during resume. Otherwise, the sensor doesn't
> > work properly after S3.
> > 
> > Signed-off-by: he, bo <bo.he@intel.com>
> > Signed-off-by: Chen, Hu <hu1.chen@intel.com>  
> 
> Thanks, patch looks good to me:
I'd have had an ever so slight preference for a goto as I prefer
errors to be checked for rather than good paths (as that's the more
common pattern), but I don't care strongly enough to ask for
a v4!

> 
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Applied to the fixes-togreg branch of iio.git and marked for stable.

Thanks,

Jonathan
> 
> Regards,
> 
> Hans
> 
> 
> 
> > ---
> >   v3: Avoid unnecessary mutex_unlock (Hans).
> >   v2: Handle return value independently (Jonathan).
> > 
> >   drivers/iio/accel/kxcjk-1013.c | 2 ++
> >   1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c
> > index 7096e577b23f..50f3ff386bea 100644
> > --- a/drivers/iio/accel/kxcjk-1013.c
> > +++ b/drivers/iio/accel/kxcjk-1013.c
> > @@ -1437,6 +1437,8 @@ static int kxcjk1013_resume(struct device *dev)
> >   
> >   	mutex_lock(&data->mutex);
> >   	ret = kxcjk1013_set_mode(data, OPERATION);
> > +	if (ret == 0)
> > +		ret = kxcjk1013_set_range(data, data->range);
> >   	mutex_unlock(&data->mutex);
> >   
> >   	return ret;
> >   


      reply	other threads:[~2019-03-09 17:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-21  3:13 [PATCH] io: accel: kxcjk1013: restore the range after resume He, Bo
2019-03-03 16:17 ` Jonathan Cameron
2019-03-04  7:05   ` [PATCH v2] " Chen, Hu
2019-03-04  9:16     ` Hans de Goede
2019-03-06  2:32       ` [PATCH v3] " Chen, Hu
2019-03-06  8:43         ` Hans de Goede
2019-03-09 17:32           ` 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=20190309173211.00c205e3@archlinux \
    --to=jic23@kernel.org \
    --cc=bo.he@intel.com \
    --cc=hdegoede@redhat.com \
    --cc=hu1.chen@intel.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=stephan@gerhold.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.