[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190309173211.00c205e3@archlinux>
Date: Sat, 9 Mar 2019 17:32:11 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Hans de Goede <hdegoede@...hat.com>
Cc: "Chen, Hu" <hu1.chen@...el.com>, bo.he@...el.com,
Hartmut Knaack <knaack.h@....de>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald-Stadler <pmeerw@...erw.net>,
Stephan Gerhold <stephan@...hold.net>,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] io: accel: kxcjk1013: restore the range after
resume.
On Wed, 6 Mar 2019 09:43:24 +0100
Hans de Goede <hdegoede@...hat.com> wrote:
> Hi,
>
> On 06-03-19 03:32, Chen, Hu wrote:
> > From: "he, bo" <bo.he@...el.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@...el.com>
> > Signed-off-by: Chen, Hu <hu1.chen@...el.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@...hat.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;
> >
Powered by blists - more mailing lists