Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 38e003f4 authored by Daniel Lockyer's avatar Daniel Lockyer Committed by Linus Walleij
Browse files

gpio: Fix checkpatch.pl issues



This patch fixes some issues given by checkpatch. Fixes include
bracket placement, spacing and indenting.

Signed-off-by: default avatarDaniel Lockyer <thisisdaniellockyer@gmail.com>
Reviewed-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 84f28998
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -107,7 +107,8 @@ static int altera_gpio_irq_set_type(struct irq_data *d,
	return -EINVAL;
}

static unsigned int altera_gpio_irq_startup(struct irq_data *d) {
static unsigned int altera_gpio_irq_startup(struct irq_data *d)
{
	altera_gpio_irq_unmask(d);

	return 0;
+1 −2
Original line number Diff line number Diff line
@@ -95,9 +95,8 @@ static inline int to_reg(int gpio, enum ctrl_register reg_type)
{
	int reg;

	if (gpio == 94) {
	if (gpio == 94)
		return GPIOPANELCTL;
	}

	if (reg_type == CTRL_IN) {
		if (gpio < 8)
+7 −10
Original line number Diff line number Diff line
@@ -1309,12 +1309,11 @@ static void gpio_chip_set_multiple(struct gpio_chip *chip,
				continue;
			}
			/* set outputs if the corresponding mask bit is set */
			if (__test_and_clear_bit(i, mask)) {
			if (__test_and_clear_bit(i, mask))
				chip->set(chip, i, test_bit(i, bits));
		}
	}
}
}

static void gpiod_set_array_value_priv(bool raw, bool can_sleep,
				       unsigned int array_size,
@@ -1329,9 +1328,9 @@ static void gpiod_set_array_value_priv(bool raw, bool can_sleep,
		unsigned long bits[BITS_TO_LONGS(chip->ngpio)];
		int count = 0;

		if (!can_sleep) {
		if (!can_sleep)
			WARN_ON(chip->can_sleep);
		}

		memset(mask, 0, sizeof(mask));
		do {
			struct gpio_desc *desc = desc_array[i];
@@ -1351,21 +1350,19 @@ static void gpiod_set_array_value_priv(bool raw, bool can_sleep,
				_gpio_set_open_source_value(desc, value);
			} else {
				__set_bit(hwgpio, mask);
				if (value) {
				if (value)
					__set_bit(hwgpio, bits);
				} else {
				else
					__clear_bit(hwgpio, bits);
				}
				count++;
			}
			i++;
		} while ((i < array_size) && (desc_array[i]->chip == chip));
		/* push collected bits to outputs */
		if (count != 0) {
		if (count != 0)
			gpio_chip_set_multiple(chip, mask, bits);
	}
}
}

/**
 * gpiod_set_raw_value() - assign a gpio's raw value
+2 −2

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.