diff options
author | Bartosz Golaszewski | 2019-11-27 12:19:21 +0100 |
---|---|---|
committer | Bartosz Golaszewski | 2020-02-12 12:05:47 +0100 |
commit | dea9c80ee6726986d90260f135c83545427cbc4e (patch) | |
tree | a6cf687b8d2ec038e0c0bd0aabe628a7c9aa7ef3 /drivers/mcb | |
parent | 5195a89e8583bba43ec13871a7226763e401b44e (diff) |
gpiolib: rework the locking mechanism for lineevent kfifo
The read_lock mutex is supposed to prevent collisions between reading
and writing to the line event kfifo but it's actually only taken when
the events are being read from it.
Drop the mutex entirely and reuse the spinlock made available to us in
the waitqueue struct. Take the lock whenever the fifo is modified or
inspected. Drop the call to kfifo_to_user() and instead first extract
the new element from kfifo when the lock is taken and only then pass
it on to the user after the spinlock is released.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/mcb')
0 files changed, 0 insertions, 0 deletions