Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Daniel Lockyer and committed by
Linus Walleij
38e003f4 84f28998

+13 -16
+2 -1
drivers/gpio/gpio-altera.c
··· 107 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 112 altera_gpio_irq_unmask(d); 112 113 113 114 return 0;
+1 -2
drivers/gpio/gpio-crystalcove.c
··· 95 95 { 96 96 int reg; 97 97 98 - if (gpio == 94) { 98 + if (gpio == 94) 99 99 return GPIOPANELCTL; 100 - } 101 100 102 101 if (reg_type == CTRL_IN) { 103 102 if (gpio < 8)
+2 -2
drivers/gpio/gpio-f7188x.c
··· 172 172 }; 173 173 174 174 static struct f7188x_gpio_bank f71882_gpio_bank[] = { 175 - F7188X_GPIO_BANK(0 , 8, 0xF0), 175 + F7188X_GPIO_BANK(0, 8, 0xF0), 176 176 F7188X_GPIO_BANK(10, 8, 0xE0), 177 177 F7188X_GPIO_BANK(20, 8, 0xD0), 178 178 F7188X_GPIO_BANK(30, 4, 0xC0), ··· 180 180 }; 181 181 182 182 static struct f7188x_gpio_bank f71889_gpio_bank[] = { 183 - F7188X_GPIO_BANK(0 , 7, 0xF0), 183 + F7188X_GPIO_BANK(0, 7, 0xF0), 184 184 F7188X_GPIO_BANK(10, 7, 0xE0), 185 185 F7188X_GPIO_BANK(20, 8, 0xD0), 186 186 F7188X_GPIO_BANK(30, 8, 0xC0),
+1 -1
drivers/gpio/gpio-it8761e.c
··· 123 123 124 124 curr_vals = inb(reg); 125 125 if (val) 126 - outb(curr_vals | (1 << bit) , reg); 126 + outb(curr_vals | (1 << bit), reg); 127 127 else 128 128 outb(curr_vals & ~(1 << bit), reg); 129 129
+7 -10
drivers/gpio/gpiolib.c
··· 1309 1309 continue; 1310 1310 } 1311 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 1313 chip->set(chip, i, test_bit(i, bits)); 1314 - } 1315 1314 } 1316 1315 } 1317 1316 } ··· 1328 1329 unsigned long bits[BITS_TO_LONGS(chip->ngpio)]; 1329 1330 int count = 0; 1330 1331 1331 - if (!can_sleep) { 1332 + if (!can_sleep) 1332 1333 WARN_ON(chip->can_sleep); 1333 - } 1334 + 1334 1335 memset(mask, 0, sizeof(mask)); 1335 1336 do { 1336 1337 struct gpio_desc *desc = desc_array[i]; ··· 1345 1346 * open drain and open source outputs are set individually 1346 1347 */ 1347 1348 if (test_bit(FLAG_OPEN_DRAIN, &desc->flags)) { 1348 - _gpio_set_open_drain_value(desc,value); 1349 + _gpio_set_open_drain_value(desc, value); 1349 1350 } else if (test_bit(FLAG_OPEN_SOURCE, &desc->flags)) { 1350 1351 _gpio_set_open_source_value(desc, value); 1351 1352 } else { 1352 1353 __set_bit(hwgpio, mask); 1353 - if (value) { 1354 + if (value) 1354 1355 __set_bit(hwgpio, bits); 1355 - } else { 1356 + else 1356 1357 __clear_bit(hwgpio, bits); 1357 - } 1358 1358 count++; 1359 1359 } 1360 1360 i++; 1361 1361 } while ((i < array_size) && (desc_array[i]->chip == chip)); 1362 1362 /* push collected bits to outputs */ 1363 - if (count != 0) { 1363 + if (count != 0) 1364 1364 gpio_chip_set_multiple(chip, mask, bits); 1365 - } 1366 1365 } 1367 1366 } 1368 1367