summaryrefslogtreecommitdiff
path: root/drivers/target/target_core_stat.c
diff options
context:
space:
mode:
authorBartosz Golaszewski <bgolaszewski@baylibre.com>2019-11-27 12:19:21 +0100
committerBartosz Golaszewski <bgolaszewski@baylibre.com>2020-02-12 12:05:47 +0100
commitdea9c80ee6726986d90260f135c83545427cbc4e (patch)
treea6cf687b8d2ec038e0c0bd0aabe628a7c9aa7ef3 /drivers/target/target_core_stat.c
parent5195a89e8583bba43ec13871a7226763e401b44e (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/target/target_core_stat.c')
0 files changed, 0 insertions, 0 deletions