Skip to content

Commit 38e003f

Browse files
Daniel Lockyerlinusw
authored andcommitted
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 <[email protected]> Reviewed-by: Alexandre Courbot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
1 parent 84f2899 commit 38e003f

File tree

5 files changed

+13
-16
lines changed

5 files changed

+13
-16
lines changed

drivers/gpio/gpio-altera.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ static int altera_gpio_irq_set_type(struct irq_data *d,
107107
return -EINVAL;
108108
}
109109

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+
{
111112
altera_gpio_irq_unmask(d);
112113

113114
return 0;

drivers/gpio/gpio-crystalcove.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,8 @@ static inline int to_reg(int gpio, enum ctrl_register reg_type)
9595
{
9696
int reg;
9797

98-
if (gpio == 94) {
98+
if (gpio == 94)
9999
return GPIOPANELCTL;
100-
}
101100

102101
if (reg_type == CTRL_IN) {
103102
if (gpio < 8)

drivers/gpio/gpio-f7188x.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,15 @@ static struct f7188x_gpio_bank f71869a_gpio_bank[] = {
172172
};
173173

174174
static struct f7188x_gpio_bank f71882_gpio_bank[] = {
175-
F7188X_GPIO_BANK(0 , 8, 0xF0),
175+
F7188X_GPIO_BANK(0, 8, 0xF0),
176176
F7188X_GPIO_BANK(10, 8, 0xE0),
177177
F7188X_GPIO_BANK(20, 8, 0xD0),
178178
F7188X_GPIO_BANK(30, 4, 0xC0),
179179
F7188X_GPIO_BANK(40, 4, 0xB0),
180180
};
181181

182182
static struct f7188x_gpio_bank f71889_gpio_bank[] = {
183-
F7188X_GPIO_BANK(0 , 7, 0xF0),
183+
F7188X_GPIO_BANK(0, 7, 0xF0),
184184
F7188X_GPIO_BANK(10, 7, 0xE0),
185185
F7188X_GPIO_BANK(20, 8, 0xD0),
186186
F7188X_GPIO_BANK(30, 8, 0xC0),

drivers/gpio/gpio-it8761e.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ static void it8761e_gpio_set(struct gpio_chip *gc,
123123

124124
curr_vals = inb(reg);
125125
if (val)
126-
outb(curr_vals | (1 << bit) , reg);
126+
outb(curr_vals | (1 << bit), reg);
127127
else
128128
outb(curr_vals & ~(1 << bit), reg);
129129

drivers/gpio/gpiolib.c

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,9 +1309,8 @@ static void gpio_chip_set_multiple(struct gpio_chip *chip,
13091309
continue;
13101310
}
13111311
/* 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))
13131313
chip->set(chip, i, test_bit(i, bits));
1314-
}
13151314
}
13161315
}
13171316
}
@@ -1329,9 +1328,9 @@ static void gpiod_set_array_value_priv(bool raw, bool can_sleep,
13291328
unsigned long bits[BITS_TO_LONGS(chip->ngpio)];
13301329
int count = 0;
13311330

1332-
if (!can_sleep) {
1331+
if (!can_sleep)
13331332
WARN_ON(chip->can_sleep);
1334-
}
1333+
13351334
memset(mask, 0, sizeof(mask));
13361335
do {
13371336
struct gpio_desc *desc = desc_array[i];
@@ -1346,24 +1345,22 @@ static void gpiod_set_array_value_priv(bool raw, bool can_sleep,
13461345
* open drain and open source outputs are set individually
13471346
*/
13481347
if (test_bit(FLAG_OPEN_DRAIN, &desc->flags)) {
1349-
_gpio_set_open_drain_value(desc,value);
1348+
_gpio_set_open_drain_value(desc, value);
13501349
} else if (test_bit(FLAG_OPEN_SOURCE, &desc->flags)) {
13511350
_gpio_set_open_source_value(desc, value);
13521351
} else {
13531352
__set_bit(hwgpio, mask);
1354-
if (value) {
1353+
if (value)
13551354
__set_bit(hwgpio, bits);
1356-
} else {
1355+
else
13571356
__clear_bit(hwgpio, bits);
1358-
}
13591357
count++;
13601358
}
13611359
i++;
13621360
} while ((i < array_size) && (desc_array[i]->chip == chip));
13631361
/* push collected bits to outputs */
1364-
if (count != 0) {
1362+
if (count != 0)
13651363
gpio_chip_set_multiple(chip, mask, bits);
1366-
}
13671364
}
13681365
}
13691366

0 commit comments

Comments
 (0)