diff options
author | Kent Gibson <[email protected]> | 2023-12-19 08:41:56 +0800 |
---|---|---|
committer | Bartosz Golaszewski <[email protected]> | 2023-12-19 10:32:52 +0100 |
commit | 1cdc605c7d70a390ff75a814a26c6f45d75778be (patch) | |
tree | a69663f1a8cd4550c168c71c378cab8d531a86d9 /tools/perf/scripts/python/libxed.py | |
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 <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Bartosz Golaszewski <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions