diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2013-12-04 08:42:46 -0500 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2013-12-04 08:42:46 -0500 |
| commit | 9fb1f39eb2d6707d265087ee186376e24995f55a (patch) | |
| tree | 044991cf1953b02b3f820f458600fb816d913b61 /include/linux/gpio | |
| parent | b7d0a28a9f65c4f8a547ceece820b8167a854968 (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.h | 9 |
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; | |||
| 36 | * @ngpio: the number of GPIOs handled by this controller; the last GPIO | 36 | * @ngpio: the number of GPIOs handled by this controller; the last GPIO |
| 37 | * handled is (base + ngpio - 1). | 37 | * handled is (base + ngpio - 1). |
| 38 | * @desc: array of ngpio descriptors. Private. | 38 | * @desc: array of ngpio descriptors. Private. |
| 39 | * @can_sleep: flag must be set iff get()/set() methods sleep, as they | ||
| 40 | * must while accessing GPIO expander chips over I2C or SPI | ||
| 41 | * @names: if set, must be an array of strings to use as alternative | 39 | * @names: if set, must be an array of strings to use as alternative |
| 42 | * names for the GPIOs in this chip. Any entry in the array | 40 | * names for the GPIOs in this chip. Any entry in the array |
| 43 | * may be NULL if there is no alias for the GPIO, however the | 41 | * may be NULL if there is no alias for the GPIO, however the |
| 44 | * array must be @ngpio entries long. A name can include a single printk | 42 | * array must be @ngpio entries long. A name can include a single printk |
| 45 | * format specifier for an unsigned int. It is substituted by the actual | 43 | * format specifier for an unsigned int. It is substituted by the actual |
| 46 | * number of the gpio. | 44 | * number of the gpio. |
| 45 | * @can_sleep: flag must be set iff get()/set() methods sleep, as they | ||
| 46 | * must while accessing GPIO expander chips over I2C or SPI | ||
| 47 | * @exported: flags if the gpiochip is exported for use from sysfs. Private. | ||
| 47 | * | 48 | * |
| 48 | * A gpio_chip can help platforms abstract various sources of GPIOs so | 49 | * A gpio_chip can help platforms abstract various sources of GPIOs so |
| 49 | * they can all be accessed through a common programing interface. | 50 | * they can all be accessed through a common programing interface. |
| @@ -88,8 +89,8 @@ struct gpio_chip { | |||
| 88 | u16 ngpio; | 89 | u16 ngpio; |
| 89 | struct gpio_desc *desc; | 90 | struct gpio_desc *desc; |
| 90 | const char *const *names; | 91 | const char *const *names; |
| 91 | unsigned can_sleep:1; | 92 | bool can_sleep; |
| 92 | unsigned exported:1; | 93 | bool exported; |
| 93 | 94 | ||
| 94 | #if defined(CONFIG_OF_GPIO) | 95 | #if defined(CONFIG_OF_GPIO) |
| 95 | /* | 96 | /* |
