diff options
author | Kent Gibson <warthog618@gmail.com> | 2023-12-19 08:41:56 +0800 |
---|---|---|
committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2023-12-19 10:32:52 +0100 |
commit | 1cdc605c7d70a390ff75a814a26c6f45d75778be (patch) | |
tree | a69663f1a8cd4550c168c71c378cab8d531a86d9 /scripts | |
parent | 193b6b0902bf57ff13bbadaa037a288c73c9d126 (diff) |
gpiolib: cdev: reduce locking in gpio_desc_to_lineinfo()
Reduce the time holding the gpio_lock by snapshotting the desc flags,
rather than testing them individually while holding the lock.
Accept that the calculation of the used field is inherently racy, and
only check the availability of the line from pinctrl if other checks
pass, so avoiding the check for lines that are otherwise in use.
Signed-off-by: Kent Gibson <warthog618@gmail.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions