]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
gpio: cdev: update flags at once when reconfiguring from user-space
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Fri, 4 Oct 2024 14:43:24 +0000 (16:43 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 8 Oct 2024 08:21:46 +0000 (10:21 +0200)
commitb7adfb6076ff0c1ebbde56d1903daa3d07db92c5
tree7f09c10a96d0462cc2a64c99630ac5ac6ba4ec60
parentfa17f749ee5bc6afdaa9e0ddbe6a816b490dad7d
gpio: cdev: update flags at once when reconfiguring from user-space

Make updating the descriptor flags when reconfiguring from user-space
consistent with the rest of the codebase: read the current state
atomically, update it according to user's instructions and write it back
atomically as well.

Reviewed-by: Kent Gibson <warthog618@gmail.com>
Link: https://lore.kernel.org/r/20241004-gpio-notify-in-kernel-events-v1-3-8ac29e1df4fe@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpiolib-cdev.c