[PATCH] hwmon: w83792d use sensor-attr arrays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jim,

> AFAICT, you removed the i--
> but didnt build it (that -1 offset) into the initializations,
> and now your fan attributes have a skew of 1.
> 
> IOW, ITYW something like this.
> 
> > +static struct sensor_device_attribute sda_fan_min[] = {
> > +	SENSOR_ATTR(fan1_min, S_IWUSR|S_IRUGO, show_fan_min,
store_fan_min, 0),
> > +	SENSOR_ATTR(fan2_min, S_IWUSR|S_IRUGO, show_fan_min,
store_fan_min, 1),
> > +	SENSOR_ATTR(fan3_min, S_IWUSR|S_IRUGO, show_fan_min,
store_fan_min, 2),
> >
There was no skew in my test, the flow is 
device_create_file_fan(dev, 0); => device_create_file(dev,
&sda_fan_min[0].dev_attr);
But what you suggested is good, and it also need to modify
show_fan_min() and store_fan_min(), same with fan*_input and fan*_div, I
hope we can do it next patch ;)

Best Regards
Yuan Mu


===========================================================================================The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such  a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Winbond is strictly prohibited; and any information in this email irrelevant to the official business of Winbond shall be deemed as neither given nor endorsed by Winbond.
===========================================================================================If your computer is unable to decode Chinese font, please ignore the following message.It essentially repeats the statement in English given above.???H???????t?????q?l???]???????K?????T, ?????v???o?H?H???w?????H?H???\\????. ?????z???D?Q???w?????H?H???]???????]?b???g???v?????????U???????H??, ???z?i?????o?H?H?????Y?N?H???q?q???P???????A???????H????. ?????z???X?@, ?????????P??. ?S??????, ???????g???v?????????????q?l?????K???T???????O?Q?Y???T????. ?H???P?????q?l???~?L???????e,???o?????????q?l?????????N??.




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux