lkml.org 
[lkml]   [2011]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] hwmon: add caseopen detection to w83627ehf driver
On 10:46 Thu 11 Aug     , Guenter Roeck wrote:
> Hi Dmitry,
>
> please consider the changes suggested below.

[...]

> > +static struct sensor_device_attribute sda_caseopen[] = {
> > + SENSOR_ATTR(intrusion0_alarm, S_IWUSR | S_IRUGO, show_caseopen,
> > + clear_caseopen, 0),
> > + SENSOR_ATTR(intrusion1_alarm, S_IWUSR | S_IRUGO, show_caseopen,
> > + clear_caseopen, 1),
>
> SENSOR_ATTR_2(intrusion0_alarm, S_IWUSR | S_IRUGO,
> show_caseopen, clear_caseopen, 0x80, 0x10),
> SENSOR_ATTR_2(intrusion1_alarm, S_IWUSR | S_IRUGO,
> show_caseopen, clear_caseopen, 0x40, 0x40),
>

Oh, yeah! That's much neater with SENSOR_ATTR_2 - thanks for suggestion!
I've seen it while looking to other hwmon drivers, but missed the difference
from plain SENSOR_ATTR...

I've incorporated your suggested changes into v3 of the patch - it will follow
this mail.

--
Best regards,
Dmitry "MAD" Artamonow



\
 
 \ /
  Last update: 2011-08-12 22:41    [W:0.069 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site