gpiolib: cdev: document that line eflags are shared
authorKent Gibson <warthog618@gmail.com>
Wed, 14 Oct 2020 06:29:21 +0000 (14:29 +0800)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Mon, 26 Oct 2020 14:26:31 +0000 (15:26 +0100)
commit3ffb7c45d193c771d7fc7722be0a45bc196f25f9
tree262cc286fc645cacf3483c2dabcbbed049c8cc68
parent7b58696d9a8415576317615c63e9899797026f17
gpiolib: cdev: document that line eflags are shared

The line.eflags field is shared so document this fact and highlight it
throughout using READ_ONCE() and WRITE_ONCE() accessors.

Also use a local copy of the eflags in edge_irq_thread() to ensure
consistent control flow even if eflags changes.  This is only a defensive
measure as edge_irq_thread() is currently disabled when the eflags are
changed.

Signed-off-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/gpio/gpiolib-cdev.c