diff options
author | Daniel Lockyer <thisisdaniellockyer@gmail.com> | 2015-06-10 09:26:27 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-06-16 05:00:06 -0400 |
commit | 38e003f4b5dc405158b9ce625d8cc2b336d45497 (patch) | |
tree | 7ab6df4d7a41a366b9ec53907dc1ea6f915b9e17 /drivers | |
parent | 84f28998cc96546bb0733d2c238b23f38442ed89 (diff) |
gpio: Fix checkpatch.pl issues
This patch fixes some issues given by checkpatch. Fixes include
bracket placement, spacing and indenting.
Signed-off-by: Daniel Lockyer <thisisdaniellockyer@gmail.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpio/gpio-altera.c | 3 | ||||
-rw-r--r-- | drivers/gpio/gpio-crystalcove.c | 3 | ||||
-rw-r--r-- | drivers/gpio/gpio-f7188x.c | 4 | ||||
-rw-r--r-- | drivers/gpio/gpio-it8761e.c | 2 | ||||
-rw-r--r-- | drivers/gpio/gpiolib.c | 17 |
5 files changed, 13 insertions, 16 deletions
diff --git a/drivers/gpio/gpio-altera.c b/drivers/gpio/gpio-altera.c index 449fb46cb8a0..0f3d336d6303 100644 --- a/drivers/gpio/gpio-altera.c +++ b/drivers/gpio/gpio-altera.c | |||
@@ -107,7 +107,8 @@ static int altera_gpio_irq_set_type(struct irq_data *d, | |||
107 | return -EINVAL; | 107 | return -EINVAL; |
108 | } | 108 | } |
109 | 109 | ||
110 | static unsigned int altera_gpio_irq_startup(struct irq_data *d) { | 110 | static unsigned int altera_gpio_irq_startup(struct irq_data *d) |
111 | { | ||
111 | altera_gpio_irq_unmask(d); | 112 | altera_gpio_irq_unmask(d); |
112 | 113 | ||
113 | return 0; | 114 | return 0; |
diff --git a/drivers/gpio/gpio-crystalcove.c b/drivers/gpio/gpio-crystalcove.c index 2c39811366bf..fddd204dc9b6 100644 --- a/drivers/gpio/gpio-crystalcove.c +++ b/drivers/gpio/gpio-crystalcove.c | |||
@@ -95,9 +95,8 @@ static inline int to_reg(int gpio, enum ctrl_register reg_type) | |||
95 | { | 95 | { |
96 | int reg; | 96 | int reg; |
97 | 97 | ||
98 | if (gpio == 94) { | 98 | if (gpio == 94) |
99 | return GPIOPANELCTL; | 99 | return GPIOPANELCTL; |
100 | } | ||
101 | 100 | ||
102 | if (reg_type == CTRL_IN) { | 101 | if (reg_type == CTRL_IN) { |
103 | if (gpio < 8) | 102 | if (gpio < 8) |
diff --git a/drivers/gpio/gpio-f7188x.c b/drivers/gpio/gpio-f7188x.c index dbda8433c4f7..5e3c4fa67d82 100644 --- a/drivers/gpio/gpio-f7188x.c +++ b/drivers/gpio/gpio-f7188x.c | |||
@@ -172,7 +172,7 @@ static struct f7188x_gpio_bank f71869a_gpio_bank[] = { | |||
172 | }; | 172 | }; |
173 | 173 | ||
174 | static struct f7188x_gpio_bank f71882_gpio_bank[] = { | 174 | static struct f7188x_gpio_bank f71882_gpio_bank[] = { |
175 | F7188X_GPIO_BANK(0 , 8, 0xF0), | 175 | F7188X_GPIO_BANK(0, 8, 0xF0), |
176 | F7188X_GPIO_BANK(10, 8, 0xE0), | 176 | F7188X_GPIO_BANK(10, 8, 0xE0), |
177 | F7188X_GPIO_BANK(20, 8, 0xD0), | 177 | F7188X_GPIO_BANK(20, 8, 0xD0), |
178 | F7188X_GPIO_BANK(30, 4, 0xC0), | 178 | F7188X_GPIO_BANK(30, 4, 0xC0), |
@@ -180,7 +180,7 @@ static struct f7188x_gpio_bank f71882_gpio_bank[] = { | |||
180 | }; | 180 | }; |
181 | 181 | ||
182 | static struct f7188x_gpio_bank f71889_gpio_bank[] = { | 182 | static struct f7188x_gpio_bank f71889_gpio_bank[] = { |
183 | F7188X_GPIO_BANK(0 , 7, 0xF0), | 183 | F7188X_GPIO_BANK(0, 7, 0xF0), |
184 | F7188X_GPIO_BANK(10, 7, 0xE0), | 184 | F7188X_GPIO_BANK(10, 7, 0xE0), |
185 | F7188X_GPIO_BANK(20, 8, 0xD0), | 185 | F7188X_GPIO_BANK(20, 8, 0xD0), |
186 | F7188X_GPIO_BANK(30, 8, 0xC0), | 186 | F7188X_GPIO_BANK(30, 8, 0xC0), |
diff --git a/drivers/gpio/gpio-it8761e.c b/drivers/gpio/gpio-it8761e.c index dadfc245cf09..30a8f24c92c5 100644 --- a/drivers/gpio/gpio-it8761e.c +++ b/drivers/gpio/gpio-it8761e.c | |||
@@ -123,7 +123,7 @@ static void it8761e_gpio_set(struct gpio_chip *gc, | |||
123 | 123 | ||
124 | curr_vals = inb(reg); | 124 | curr_vals = inb(reg); |
125 | if (val) | 125 | if (val) |
126 | outb(curr_vals | (1 << bit) , reg); | 126 | outb(curr_vals | (1 << bit), reg); |
127 | else | 127 | else |
128 | outb(curr_vals & ~(1 << bit), reg); | 128 | outb(curr_vals & ~(1 << bit), reg); |
129 | 129 | ||
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 7f87b9baa905..de56e5757d3d 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c | |||
@@ -1309,9 +1309,8 @@ static void gpio_chip_set_multiple(struct gpio_chip *chip, | |||
1309 | continue; | 1309 | continue; |
1310 | } | 1310 | } |
1311 | /* set outputs if the corresponding mask bit is set */ | 1311 | /* set outputs if the corresponding mask bit is set */ |
1312 | if (__test_and_clear_bit(i, mask)) { | 1312 | if (__test_and_clear_bit(i, mask)) |
1313 | chip->set(chip, i, test_bit(i, bits)); | 1313 | chip->set(chip, i, test_bit(i, bits)); |
1314 | } | ||
1315 | } | 1314 | } |
1316 | } | 1315 | } |
1317 | } | 1316 | } |
@@ -1329,9 +1328,9 @@ static void gpiod_set_array_value_priv(bool raw, bool can_sleep, | |||
1329 | unsigned long bits[BITS_TO_LONGS(chip->ngpio)]; | 1328 | unsigned long bits[BITS_TO_LONGS(chip->ngpio)]; |
1330 | int count = 0; | 1329 | int count = 0; |
1331 | 1330 | ||
1332 | if (!can_sleep) { | 1331 | if (!can_sleep) |
1333 | WARN_ON(chip->can_sleep); | 1332 | WARN_ON(chip->can_sleep); |
1334 | } | 1333 | |
1335 | memset(mask, 0, sizeof(mask)); | 1334 | memset(mask, 0, sizeof(mask)); |
1336 | do { | 1335 | do { |
1337 | struct gpio_desc *desc = desc_array[i]; | 1336 | struct gpio_desc *desc = desc_array[i]; |
@@ -1346,24 +1345,22 @@ static void gpiod_set_array_value_priv(bool raw, bool can_sleep, | |||
1346 | * open drain and open source outputs are set individually | 1345 | * open drain and open source outputs are set individually |
1347 | */ | 1346 | */ |
1348 | if (test_bit(FLAG_OPEN_DRAIN, &desc->flags)) { | 1347 | if (test_bit(FLAG_OPEN_DRAIN, &desc->flags)) { |
1349 | _gpio_set_open_drain_value(desc,value); | 1348 | _gpio_set_open_drain_value(desc, value); |
1350 | } else if (test_bit(FLAG_OPEN_SOURCE, &desc->flags)) { | 1349 | } else if (test_bit(FLAG_OPEN_SOURCE, &desc->flags)) { |
1351 | _gpio_set_open_source_value(desc, value); | 1350 | _gpio_set_open_source_value(desc, value); |
1352 | } else { | 1351 | } else { |
1353 | __set_bit(hwgpio, mask); | 1352 | __set_bit(hwgpio, mask); |
1354 | if (value) { | 1353 | if (value) |
1355 | __set_bit(hwgpio, bits); | 1354 | __set_bit(hwgpio, bits); |
1356 | } else { | 1355 | else |
1357 | __clear_bit(hwgpio, bits); | 1356 | __clear_bit(hwgpio, bits); |
1358 | } | ||
1359 | count++; | 1357 | count++; |
1360 | } | 1358 | } |
1361 | i++; | 1359 | i++; |
1362 | } while ((i < array_size) && (desc_array[i]->chip == chip)); | 1360 | } while ((i < array_size) && (desc_array[i]->chip == chip)); |
1363 | /* push collected bits to outputs */ | 1361 | /* push collected bits to outputs */ |
1364 | if (count != 0) { | 1362 | if (count != 0) |
1365 | gpio_chip_set_multiple(chip, mask, bits); | 1363 | gpio_chip_set_multiple(chip, mask, bits); |
1366 | } | ||
1367 | } | 1364 | } |
1368 | } | 1365 | } |
1369 | 1366 | ||