summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpiolib.h
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2015-01-13 13:00:06 +0100
committerLinus Walleij <linus.walleij@linaro.org>2015-01-15 17:20:56 +0100
commitebbeba120ab2ec6ac5f3afc1425ec6ff0b77ad6f (patch)
tree34ced1282b4b34b9ee79e9e0549dbca3ade7aab6 /drivers/gpio/gpiolib.h
parent0915e6feb38de8d3601819992a5bd050201a56fa (diff)
downloadlwn-ebbeba120ab2ec6ac5f3afc1425ec6ff0b77ad6f.tar.gz
lwn-ebbeba120ab2ec6ac5f3afc1425ec6ff0b77ad6f.zip
gpio: sysfs: fix gpio attribute-creation race
Fix attribute-creation race with userspace by using the default group to create also the contingent gpio device attributes. Fixes: d8f388d8dc8d ("gpio: sysfs interface") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpiolib.h')
-rw-r--r--drivers/gpio/gpiolib.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h
index e3a52113a541..550a5eafbd38 100644
--- a/drivers/gpio/gpiolib.h
+++ b/drivers/gpio/gpiolib.h
@@ -77,6 +77,7 @@ struct gpio_desc {
#define FLAG_OPEN_DRAIN 7 /* Gpio is open drain type */
#define FLAG_OPEN_SOURCE 8 /* Gpio is open source type */
#define FLAG_USED_AS_IRQ 9 /* GPIO is connected to an IRQ */
+#define FLAG_SYSFS_DIR 10 /* show sysfs direction attribute */
#define ID_SHIFT 16 /* add new flags before this one */