Skip to content

Commit 2cbfca6

Browse files
amboarLinus Walleij
authored andcommitted
gpio: Fix loose spelling
Literally. I expect "lose" was meant here, rather than "loose", though you could feasibly use a somewhat uncommon definition of "loose" to mean what would be meant by "lose": "Loose the hounds" for instance, as in "Release the hounds". Substituting in "value" for "hounds" gives "release the value", and makes some sense, but futher substituting back to loose gives "loose the value" which overall just seems a bit anachronistic. Instead, use modern, pragmatic English and save a character. Cc: Russell Currey <ruscur@russell.cc> Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent b2f68ed commit 2cbfca6

6 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎drivers/gpio/gpiolib-of.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id,
153153
*flags |= GPIO_OPEN_SOURCE;
154154
}
155155

156-
if (of_flags & OF_GPIO_SLEEP_MAY_LOOSE_VALUE)
157-
*flags |= GPIO_SLEEP_MAY_LOOSE_VALUE;
156+
if (of_flags & OF_GPIO_SLEEP_MAY_LOSE_VALUE)
157+
*flags |= GPIO_SLEEP_MAY_LOSE_VALUE;
158158

159159
return desc;
160160
}

‎drivers/gpio/gpiolib.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3010,7 +3010,7 @@ bool gpiochip_line_is_persistent(struct gpio_chip *chip, unsigned int offset)
30103010
if (offset >= chip->ngpio)
30113011
return false;
30123012

3013-
return !test_bit(FLAG_SLEEP_MAY_LOOSE_VALUE,
3013+
return !test_bit(FLAG_SLEEP_MAY_LOSE_VALUE,
30143014
&chip->gpiodev->descs[offset].flags);
30153015
}
30163016
EXPORT_SYMBOL_GPL(gpiochip_line_is_persistent);
@@ -3435,8 +3435,8 @@ int gpiod_configure_flags(struct gpio_desc *desc, const char *con_id,
34353435
set_bit(FLAG_OPEN_DRAIN, &desc->flags);
34363436
if (lflags & GPIO_OPEN_SOURCE)
34373437
set_bit(FLAG_OPEN_SOURCE, &desc->flags);
3438-
if (lflags & GPIO_SLEEP_MAY_LOOSE_VALUE)
3439-
set_bit(FLAG_SLEEP_MAY_LOOSE_VALUE, &desc->flags);
3438+
if (lflags & GPIO_SLEEP_MAY_LOSE_VALUE)
3439+
set_bit(FLAG_SLEEP_MAY_LOSE_VALUE, &desc->flags);
34403440

34413441
/* No particular flag request, return here... */
34423442
if (!(dflags & GPIOD_FLAGS_BIT_DIR_SET)) {

‎drivers/gpio/gpiolib.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ struct gpio_desc {
205205
#define FLAG_OPEN_SOURCE 8 /* Gpio is open source type */
206206
#define FLAG_USED_AS_IRQ 9 /* GPIO is connected to an IRQ */
207207
#define FLAG_IS_HOGGED 11 /* GPIO is hogged */
208-
#define FLAG_SLEEP_MAY_LOOSE_VALUE 12 /* GPIO may loose value in sleep */
208+
#define FLAG_SLEEP_MAY_LOSE_VALUE 12 /* GPIO may lose value in sleep */
209209

210210
/* Connection label */
211211
const char *label;

‎include/dt-bindings/gpio/gpio.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@
3030

3131
/* Bit 3 express GPIO suspend/resume persistence */
3232
#define GPIO_SLEEP_MAINTAIN_VALUE 0
33-
#define GPIO_SLEEP_MAY_LOOSE_VALUE 8
33+
#define GPIO_SLEEP_MAY_LOSE_VALUE 8
3434

3535
#endif

‎include/linux/gpio/machine.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ enum gpio_lookup_flags {
1010
GPIO_OPEN_DRAIN = (1 << 1),
1111
GPIO_OPEN_SOURCE = (1 << 2),
1212
GPIO_SLEEP_MAINTAIN_VALUE = (0 << 3),
13-
GPIO_SLEEP_MAY_LOOSE_VALUE = (1 << 3),
13+
GPIO_SLEEP_MAY_LOSE_VALUE = (1 << 3),
1414
};
1515

1616
/**

‎include/linux/of_gpio.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ enum of_gpio_flags {
3131
OF_GPIO_ACTIVE_LOW = 0x1,
3232
OF_GPIO_SINGLE_ENDED = 0x2,
3333
OF_GPIO_OPEN_DRAIN = 0x4,
34-
OF_GPIO_SLEEP_MAY_LOOSE_VALUE = 0x8,
34+
OF_GPIO_SLEEP_MAY_LOSE_VALUE = 0x8,
3535
};
3636

3737
#ifdef CONFIG_OF_GPIO

0 commit comments

Comments
 (0)