Winbond W83792D driver

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

 



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??.



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

  Powered by Linux