Re: [PATCH v9 52/55] input: touchscreen: atmel_mxt_ts: Added sysfs entry for touchscreen status
From: Dmitry Osipenko
Date: Fri Mar 27 2020 - 09:43:59 EST
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)".