X86 platform drivers
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
To: Corentin Chary <corentin.chary-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "Martin Liška"
	<marxin.liska-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Marek Vašut" <marex-ynQEQJNshbs@public.gmane.org>,
	"Jonathan Cameron"
	<jic23-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org>,
	"platform-driver-x86-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<platform-driver-x86-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "Zhang,
	Rui" <rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	joeyli <jlee-IBi9RG/b67k@public.gmane.org>,
	"Len Brown" <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	pavel-ynQEQJNshbs@public.gmane.org,
	"Jon Brenner" <jbrenner-yYKgigLBUwlBDgjK7y7TUQ@public.gmane.org>,
	"Peter Meerwald" <pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org>
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-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 11/29/2012 09:02 AM, Corentin Chary wrote:
> On Thu, Nov 29, 2012 at 2:46 AM,  <marxin.liska-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> From: marxin <marxin.liska-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>
>> ---
>>  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);
>>  }
[...]

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

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAObPJ3PctmLP56NvmLvJd+4w9e4xeOGSyz24FyBDXBQQVhDhxQ@mail.gmail.com>
     [not found] ` <CAObPJ3PctmLP56NvmLvJd+4w9e4xeOGSyz24FyBDXBQQVhDhxQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-07-08 20:28   ` ACPI ambient light sensor Marek Vasut
     [not found]     ` <201207082228.14318.marex-ynQEQJNshbs@public.gmane.org>
2012-07-09 13:29       ` Jonathan Cameron
     [not found]         ` <CAObPJ3ORe_MGbmEHzZ4SGqZkn3HCQs+ocSw=Ttb7LbCTNCDkAQ@mail.gmail.com>
     [not found]           ` <CAObPJ3ORe_MGbmEHzZ4SGqZkn3HCQs+ocSw=Ttb7LbCTNCDkAQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-09-11  8:27             ` Marek Vasut
2012-09-11  9:21             ` Marek Vasut
     [not found]               ` <CAObPJ3PB0VYNE9vhrwJRA9jpWX6p7_Kw8T2eCMgj0M0zJ9feUA@mail.gmail.com>
     [not found]                 ` <CAObPJ3PB0VYNE9vhrwJRA9jpWX6p7_Kw8T2eCMgj0M0zJ9feUA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-21 17:32                   ` Marek Vasut
2012-10-21 18:05                   ` Jonathan Cameron
     [not found]                     ` <CAObPJ3MgaVtUHOsUfATdaRGEQ23+GHceoLS0ZU1tCyik00bHpA@mail.gmail.com>
2012-10-27 17:08                       ` Jonathan Cameron
     [not found]                         ` <508C1515.5090504-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
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
     [not found]                                   ` <CAHR064gj3CUUZyuGiw6WhLjGQrhq-eAOKr-=+UmpW2Ry3mce8g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
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
     [not found]                                 ` <1354157205-2956-2-git-send-email-marxin.liska-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-11-29 10:15                                   ` Lars-Peter Clausen
     [not found]                                     ` <50B735D8.6000907-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2012-12-01 16:46                                       ` Martin Liška
     [not found]                                         ` <CAObPJ3M1yOtKTs0e7oi74+bVMjvPfe7Jn+EXVoVFzMc6cr43dQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
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-qo5elluwu/uelga04laivw@public.gmane.org \
    --cc=corentin.chary-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=jbrenner-yYKgigLBUwlBDgjK7y7TUQ@public.gmane.org \
    --cc=jic23-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org \
    --cc=jlee-IBi9RG/b67k@public.gmane.org \
    --cc=len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=marex-ynQEQJNshbs@public.gmane.org \
    --cc=marxin.liska-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=pavel-ynQEQJNshbs@public.gmane.org \
    --cc=platform-driver-x86-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org \
    --cc=rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /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