summaryrefslogtreecommitdiff
path: root/include/linux/gpio
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2013-12-04 14:42:46 +0100
committerLinus Walleij <linus.walleij@linaro.org>2013-12-04 14:42:46 +0100
commit9fb1f39eb2d6707d265087ee186376e24995f55a (patch)
tree044991cf1953b02b3f820f458600fb816d913b61 /include/linux/gpio
parentb7d0a28a9f65c4f8a547ceece820b8167a854968 (diff)
gpio/pinctrl: make gpio_chip members typed boolean
This switches the two members of struct gpio_chip that were defined as unsigned foo:1 to bool, because that is indeed what they are. Switch all users in the gpio and pinctrl subsystems to assign these values with true/false instead of 0/1. The users outside these subsystems will survive since true/false is 1/0, atleast we set some kind of more strict typing example. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/gpio')
-rw-r--r--include/linux/gpio/driver.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index 656a27efb2c8..804ec45365b7 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -36,14 +36,15 @@ struct seq_file;
* @ngpio: the number of GPIOs handled by this controller; the last GPIO
* handled is (base + ngpio - 1).
* @desc: array of ngpio descriptors. Private.
- * @can_sleep: flag must be set iff get()/set() methods sleep, as they
- * must while accessing GPIO expander chips over I2C or SPI
* @names: if set, must be an array of strings to use as alternative
* names for the GPIOs in this chip. Any entry in the array
* may be NULL if there is no alias for the GPIO, however the
* array must be @ngpio entries long. A name can include a single printk
* format specifier for an unsigned int. It is substituted by the actual
* number of the gpio.
+ * @can_sleep: flag must be set iff get()/set() methods sleep, as they
+ * must while accessing GPIO expander chips over I2C or SPI
+ * @exported: flags if the gpiochip is exported for use from sysfs. Private.
*
* A gpio_chip can help platforms abstract various sources of GPIOs so
* they can all be accessed through a common programing interface.
@@ -88,8 +89,8 @@ struct gpio_chip {
u16 ngpio;
struct gpio_desc *desc;
const char *const *names;
- unsigned can_sleep:1;
- unsigned exported:1;
+ bool can_sleep;
+ bool exported;
#if defined(CONFIG_OF_GPIO)
/*