Winbond W83792D driver

Huang0 at Winbond.com.tw Huang0 at Winbond.com.tw
Mon Apr 11 05:18:54 CEST 2005


Hi Jean


> 3* Your code does *not* free the memory you allocated for subclients
> when unloading the driver. Please add the necessary code.

I added three lines, please refer to the codes below, Am I right?

static int
w83792d_detach_client(struct i2c_client *client)
{
        int err;
        struct w83792d_data *data = i2c_get_clientdata(client);

        if ((err = i2c_detach_client(client))) {
                .../* some codes omitted here! */
        }

        if (i2c_get_clientdata(client)==NULL) {
                /* subclients */
                i2c_detach_client(&(data->lm75[0])); <-- added!
                i2c_detach_client(&(data->lm75[1])); <-- added!
                kfree(data->lm75);                   <-- added!
                kfree(client);
        } else {
                /* main client */
                kfree(i2c_get_clientdata(client));
        }
        return 0;
}


> 6* The code does *not* properly handle the case where subclients are
> disabled. If subclients addresses are forced, they will be forcibly
> enabled (this is OK). If they are not forced, then we might register
> clients which do not exist (this is NOT OK).

I meet a problem when load the 792 module after the modification to
1*-5*:
W83792d 0-002f: Subclient 1 registration at address 0x48 failed.

The 792 modules does not work, does it have something to do with your
item 6*?
Do you know how to solve this problem?

Thanks
Best Regards
Chunhao


===========================================================================================The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original author of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such person, please kindly reply the sender indicating accordingly and delete all copies of it from your computer and network server immediately. We thank you for your cooperation. It is advisable that any unauthorized use of confidential information of Winbond is strictly prohibited; and any information in this email that does not relate 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. They essentially repea!
 t the&nbsp; English statement 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