Skip to content

gpiolib: protect the list of GPIO devices with a mutex

Bartosz Golaszewski linux-gpio lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 4 repliesIn review
  2. v22 patches 6 repliesSuperseded

Changes in v3 from the cover letter

- move the new sysfs function into gpiolib-sysfs.c

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2gpiolib: rename static functions that are called with the lock takendrivers/gpio/gpiolib.c+4 -41 reply
2/2gpiolib: use a mutex to protect the list of GPIO devicesdrivers/gpio/gpiolib-sysfs.c drivers/gpio/gpiolib-sysfs.h drivers/gpio/gpiolib.c +1 more+91 -1013 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchAndy ShevchenkoLinus Walleij
1/2R-b R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] gpiolib: protect the list of GPIO devices with a mutex

From: Bartosz Golaszewski <[email protected]>

I figured that - since the descriptor locking is going to take some more time - we should at least start the conversion and protect the GPIO device list with a mutex.

v2 -> v3:
- move the new sysfs function into gpiolib-sysfs.c

v1 -> v2:
- add a patch renaming two functions
- protect the list in gpio_device_find() too
- coding style tweaks

Bartosz Golaszewski (2):
gpiolib: rename static functions that are called with the lock taken
gpiolib: use a mutex to protect the list of GPIO devices

 drivers/gpio/gpiolib-sysfs.c |  45 +++++------
 drivers/gpio/gpiolib-sysfs.h |   6 ++
 drivers/gpio/gpiolib.c       | 143 ++++++++++++++++-------------------
 drivers/gpio/gpiolib.h       |   2 +
 4 files changed, 93 insertions(+), 103 deletions(-)
Signature · 1 line
2.40.1