Searched hist:c274b58a4b8a3bfbf0bb0b5f5332e3e049d75b65 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/gpio/ |
H A D | gpiolib-cdev.c | diff c274b58a4b8a3bfbf0bb0b5f5332e3e049d75b65 Tue Jul 07 23:15:47 CDT 2020 Kent Gibson <warthog618@gmail.com> gpiolib: cdev: refactor gpiohandle_flags_to_desc_flags
Refactor the mapping from handle flags to desc flags into a helper function.
The assign_bit is overkill where it is replacing the set_bit cases, as is rechecking bits known to be clear in some circumstances, but the DRY simplification more than makes up for any performance degradation, especially as this is not a hot path.
Signed-off-by: Kent Gibson <warthog618@gmail.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|