summaryrefslogtreecommitdiff
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorKent Gibson <warthog618@gmail.com>2023-12-19 08:41:56 +0800
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-12-19 10:32:52 +0100
commit1cdc605c7d70a390ff75a814a26c6f45d75778be (patch)
treea69663f1a8cd4550c168c71c378cab8d531a86d9 /drivers/pinctrl
parent193b6b0902bf57ff13bbadaa037a288c73c9d126 (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 'drivers/pinctrl')
0 files changed, 0 insertions, 0 deletions