Re: [PATCH v9 52/55] input: touchscreen: atmel_mxt_ts: Added sysfs entry for touchscreen status

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

 



27.03.2020 16:37, Dmitry Osipenko пишет:
> 27.03.2020 15:49, Wang, Jiada пишет:
>>>> +static void mxt_watchdog_work(struct work_struct *work)
>>>> +{
>>>> +    struct mxt_data *data =
>>>> +        container_of(work, struct mxt_data, watchdog_work);
>>>> +    u16 info_buf;
>>>> +    int ret = 0;
>>>> +    u8 size = 2;

There is no need to initialize the ret variable.

>>>> +    if (data->suspended || data->in_bootloader)
>>>> +        return;
>>>> +
>>>> +    ret = __mxt_read_reg(data->client, 0, size, &info_buf);

The "size" argument could be replaced with "sizeof(info_buf)".



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux