lkml.org 
[lkml]   [2020]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v9 52/55] input: touchscreen: atmel_mxt_ts: Added sysfs entry for touchscreen status
From
Date
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;
>>
>>> +    if (data->suspended || data->in_bootloader)
>>> +        return;
>>> +
>>> +    ret = __mxt_read_reg(data->client, 0, size, &info_buf);
>>
>> Looks like this need to be protected with a lock to not race with the
>> suspending / bootloader states.
>>
> right, I will add lock in next version

Alternatively, maybe the watchdog_work could be just stopped in
suspended / bootloader states.

\
 
 \ /
  Last update: 2020-03-27 14:38    [W:0.081 / U:9.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site