[lm-sensors] [PATCH] hwmon: w83792d use sensor-attr arrays

Ymu at Winbond.com.tw Ymu at Winbond.com.tw
Tue Jan 10 02:51:18 CET 2006


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¨£.




More information about the lm-sensors mailing list