Re: [PATCH v3] iio: Add Dyna-Image AL3320A ambient light sensor driver

From: Daniel Baluta
Date: Sat Aug 30 2014 - 06:45:36 EST


On Sat, Aug 30, 2014 at 1:00 PM, Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> On 27/08/14 09:49, Hartmut Knaack wrote:
>> Daniel Baluta schrieb:
>>> Minimal implementation. This driver provides raw illuminance readings.
>>>
>>> This is based on drivers/hwmon/al3320.c (*) driver from msm tree written
>>> by Tsechih Lin <Tsechih_Lin@xxxxxxxx>
>>>
>>> * https://android.googlesource.com/kernel/msm.git
>>>
>>> Signed-off-by: Daniel Baluta <daniel.baluta@xxxxxxxxx>
>> Hi, I think you should protect your write_raw with a mutex.
> Either that or drop the local store of the value and read it back from
> the device (assuming you can!). That way everything becomes nice an
> atomic. It's a rather narrow race, but Hartmut is correct in pointing it
> out.
>
> Few comments inline, mostly about my pet peeve: wrapper functions that don't
> do much. Note I'm not that fussed if you really really want to keep them ;)
>
> Otherwise, looks good.
>

Thanks a lot for review Hartmut, Jonathan!

I will send v3 on Monday after I will re-test the changes.

Daniel.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/