linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Baluta <daniel.baluta@intel.com>
To: "Koivunen, Mikko" <Mikko.Koivunen@fi.rohmeurope.com>
Cc: Daniel Baluta <daniel.baluta@intel.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Peter Meerwald <pmeerw@pmeerw.net>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: [PATCH v3 1/9] iio: light: rpr0521 disable sensor -bugfix
Date: Mon, 15 May 2017 15:29:06 +0300	[thread overview]
Message-ID: <CAEnQRZBEOipt-JSET2_qz47W8_FAHTiFg3O_jw1Th5Lp6HYzTA@mail.gmail.com> (raw)
In-Reply-To: <E223F49C7E3E1C4E8F3928A8EC9CF0F8DBEC70AB@WILL-MAIL002.REu.RohmEu.com>

On Mon, May 15, 2017 at 1:25 PM, Koivunen, Mikko
<Mikko.Koivunen@fi.rohmeurope.com> wrote:
> On 5.5.2017 14:24, Daniel Baluta wrote:
>> On Fri, May 5, 2017 at 2:19 PM, Mikko Koivunen
>> <mikko.koivunen@fi.rohmeurope.com> wrote:
>>> Sensor was marked enabled on each call even if the call was for disabling
>>> sensor.
>>>
>>> Signed-off-by: Mikko Koivunen <mikko.koivunen@fi.rohmeurope.com>
>>> ---
>>> Tested on LeMaker HiKey with AOSP7.1 kernel 4.4.
>>> Patch v2->v3 changes:
>>> whitespace change.
>>>
>>>  drivers/iio/light/rpr0521.c |   10 ++++++++--
>>>  1 file changed, 8 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/iio/light/rpr0521.c b/drivers/iio/light/rpr0521.c
>>> index 7de0f39..03504f6 100644
>>> --- a/drivers/iio/light/rpr0521.c
>>> +++ b/drivers/iio/light/rpr0521.c
>>> @@ -197,7 +197,10 @@ static int rpr0521_als_enable(struct rpr0521_data *data, u8 status)
>>>         if (ret < 0)
>>>                 return ret;
>>>
>>> -       data->als_dev_en = true;
>> How about:
>>
>> data->als_dev_en = !!(status & RPR0521_MODE_ALS_MASK);
>>
>> Thanks for fixing this!
>>
> I got the impression previously that we should prefer verbosity instead
> of shortness when it helps understanding the code. Otherwise yes, that
> could work too.

It depends on the mood :). But you are right, lets go with your variant.

Daniel.

      reply	other threads:[~2017-05-15 12:29 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-05 11:19 [PATCH v3 1/9] iio: light: rpr0521 disable sensor -bugfix Mikko Koivunen
2017-05-05 11:19 ` [PATCH v3 2/9] iio: light: rpr0521 poweroff for probe fails Mikko Koivunen
2017-05-07 11:42   ` Jonathan Cameron
2017-05-15 10:32     ` Koivunen, Mikko
2017-05-16 18:07       ` Jonathan Cameron
2017-05-17  6:28         ` Koivunen, Mikko
2017-05-15 12:27     ` Daniel Baluta
2017-05-05 11:19 ` [PATCH v3 3/9] iio: light: rpr0521 on-off sequence change for CONFIG_PM Mikko Koivunen
2017-05-07 11:48   ` Jonathan Cameron
2017-05-15 10:40     ` Koivunen, Mikko
2017-05-16 18:08       ` Jonathan Cameron
2017-05-17  6:28         ` Koivunen, Mikko
2017-05-05 11:19 ` [PATCH v3 4/9] iio: light: rpr0521 magic number to sizeof() on value read Mikko Koivunen
2017-05-05 11:19 ` [PATCH v3 5/9] iio: light: rpr0521 whitespace fixes Mikko Koivunen
2017-05-05 11:19 ` [PATCH v3 6/9] iio: light: rpr0521 sample_frequency read/write Mikko Koivunen
2017-05-07 11:51   ` Jonathan Cameron
2017-05-15 10:42     ` Koivunen, Mikko
2017-05-16 18:15       ` Jonathan Cameron
2017-05-05 11:19 ` [PATCH v3 7/9] iio: light: rpr0521 proximity offset read/write Mikko Koivunen
2017-05-05 11:19 ` [PATCH v3 8/9] iio: light: rpr0521 channel numbers reordered Mikko Koivunen
2017-05-07 11:54   ` Jonathan Cameron
2017-05-05 11:19 ` [PATCH v3 9/9] iio: light: rpr0521 triggered buffer Mikko Koivunen
2017-05-07 12:09   ` Jonathan Cameron
2017-05-15 13:06     ` Koivunen, Mikko
2017-05-05 11:24 ` [PATCH v3 1/9] iio: light: rpr0521 disable sensor -bugfix Daniel Baluta
2017-05-15 10:25   ` Koivunen, Mikko
2017-05-15 12:29     ` Daniel Baluta [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=CAEnQRZBEOipt-JSET2_qz47W8_FAHTiFg3O_jw1Th5Lp6HYzTA@mail.gmail.com \
    --to=daniel.baluta@intel.com \
    --cc=Mikko.Koivunen@fi.rohmeurope.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).