linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Corentin Chary <corentin.chary@gmail.com>
Cc: "Martin Liška" <marxin.liska@gmail.com>,
	"Marek Vašut" <marex@denx.de>,
	"Jonathan Cameron" <jic23@cam.ac.uk>,
	"platform-driver-x86@vger.kernel.org"
	<platform-driver-x86@vger.kernel.org>,
	linux-iio@vger.kernel.org, "Zhang, Rui" <rui.zhang@intel.com>,
	joeyli <jlee@suse.com>, "Len Brown" <len.brown@intel.com>,
	pavel@denx.de, "Jon Brenner" <jbrenner@taosinc.com>,
	"Peter Meerwald" <pmeerw@pmeerw.net>
Subject: Re: [PATCH] ACPI ALS driver for iio introduced.
Date: Thu, 29 Nov 2012 11:18:18 +0100	[thread overview]
Message-ID: <50B7366A.9040800@metafoo.de> (raw)
In-Reply-To: <CAHR064gj3CUUZyuGiw6WhLjGQrhq-eAOKr-=+UmpW2Ry3mce8g@mail.gmail.com>

On 11/29/2012 09:02 AM, Corentin Chary wrote:
> On Thu, Nov 29, 2012 at 2:46 AM,  <marxin.liska@gmail.com> wrote:
>> From: marxin <marxin.liska@gmail.com>
>>
>> ---
>>  drivers/iio/industrialio-buffer.c    |    4 +-
>>  drivers/staging/iio/light/Kconfig    |    6 +
>>  drivers/staging/iio/light/Makefile   |    1 +
>>  drivers/staging/iio/light/acpi-als.c |  486 ++++++++++++++++++++++++++++++++++
>>  4 files changed, 495 insertions(+), 2 deletions(-)
>>  create mode 100644 drivers/staging/iio/light/acpi-als.c
>>
>> diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
>> index aaadd32..b8b377c 100644
>> --- a/drivers/iio/industrialio-buffer.c
>> +++ b/drivers/iio/industrialio-buffer.c
>> @@ -119,8 +119,8 @@ static ssize_t iio_scan_el_show(struct device *dev,
>>         int ret;
>>         struct iio_dev *indio_dev = dev_to_iio_dev(dev);
>>
>> -       ret = test_bit(to_iio_dev_attr(attr)->address,
>> -                      indio_dev->buffer->scan_mask);
>> +       ret = !!(test_bit(to_iio_dev_attr(attr)->address,
>> +                      indio_dev->buffer->scan_mask));
> 
> It's strange that you have to do that.
> Can you give use the exact values that make test_bit return something
> else that 1 or 0 ?
> Maybe there is a bug to fix in test_bit here.

Even if this was a bug in IIO this should be in a separate patch.

> 
>>
>>         return sprintf(buf, "%d\n", ret);
>>  }
[...]

  reply	other threads:[~2012-11-29 10:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-08 20:03 ACPI ambient light sensor Martin Liška
2012-07-08 20:28 ` Marek Vasut
2012-07-09 13:29   ` Jonathan Cameron
2012-09-11  7:48     ` Martin Liška
2012-09-11  8:27       ` Marek Vasut
2012-09-11  8:35       ` Peter Meerwald
2012-09-11  9:21       ` Marek Vasut
2012-10-21 17:02         ` Martin Liška
2012-10-21 17:32           ` Marek Vasut
2012-10-21 18:05           ` Jonathan Cameron
2012-10-27 16:39             ` Martin Liška
2012-10-27 17:08               ` Jonathan Cameron
2012-10-27 18:00                 ` Corentin Chary
2012-11-29  2:46                   ` ACPI ALS patch marxin.liska
2012-11-29  2:46                     ` [PATCH] ACPI ALS driver for iio introduced marxin.liska
2012-11-29  8:02                       ` Corentin Chary
2012-11-29 10:18                         ` Lars-Peter Clausen [this message]
     [not found]                         ` <CAObPJ3NM7mn+pXJ801hC2Dn7t9kqp4X_FuD8TSmJ6-eH7UP8pA@mail.gmail.com>
2012-12-02 11:20                           ` Corentin Chary
2012-11-29 10:15                       ` Lars-Peter Clausen
2012-12-01 16:46                         ` Martin Liška
2012-12-02 13:24                           ` Jonathan Cameron

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=50B7366A.9040800@metafoo.de \
    --to=lars@metafoo.de \
    --cc=corentin.chary@gmail.com \
    --cc=jbrenner@taosinc.com \
    --cc=jic23@cam.ac.uk \
    --cc=jlee@suse.com \
    --cc=len.brown@intel.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=marxin.liska@gmail.com \
    --cc=pavel@denx.de \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=rui.zhang@intel.com \
    /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).