lkml.org 
[lkml]   [2023]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/2] gpio: use a mutex to protect the list of GPIO devices
On Tue, Nov 28, 2023 at 3:52 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:

> We don't need to lock the GPIO device or chip separately - the
> descriptor structs will stay alive as long as there's a live reference
> to the GPIO device. GPIO device will have an SRCU cookie for
> protecting API calls against removal of the chip.
>
> To summarize: one mutex for the GPIO device list, one lock per GPIO
> descriptor and SRCU protection of the GPIO device's chip.
>
> Does it make sense?

Absolutely, standing by to review, it's gonna look awesome!

Linus

\
 
 \ /
  Last update: 2023-11-28 16:06    [W:0.081 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site