[SRU][J][PATCH 09/12] gpio: aggregator: rename 'name' to 'key' in gpio_aggregator_parse()
Koichiro Den
koichiro.den at canonical.com
Fri Apr 11 07:27:00 UTC 2025
BugLink: https://bugs.launchpad.net/bugs/2103496
Rename the local variable 'name' in gpio_aggregator_parse() to 'key'
because struct gpio_aggregator_line now uses the 'name' field for the
custom line name and the local variable actually represents a 'key'.
This change prepares for the next but one commit.
No functional change.
Reviewed-by: Geert Uytterhoeven <geert+renesas at glider.be>
Signed-off-by: Koichiro Den <koichiro.den at canonical.com>
Link: https://lore.kernel.org/r/20250407043019.4105613-6-koichiro.den@canonical.com
(backported from commit 4ec2315d7fabeb08e9ad7995bd16f34118e4633b linux-next)
[koichiroden: adjusted context due to the missing commit:
22dec5aa596e ("gpio: aggregator: simplify aggr_parse() with scoped bitmap")]
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at linaro.org>
---
drivers/gpio/gpio-aggregator.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpio/gpio-aggregator.c b/drivers/gpio/gpio-aggregator.c
index 22c47ac01c08..2c7fce670f6c 100644
--- a/drivers/gpio/gpio-aggregator.c
+++ b/drivers/gpio/gpio-aggregator.c
@@ -925,7 +925,7 @@ static struct configfs_subsystem gpio_aggregator_subsys = {
static int gpio_aggregator_parse(struct gpio_aggregator *aggr)
{
char *args = skip_spaces(aggr->args);
- char *name, *offsets, *p;
+ char *key, *offsets, *p;
unsigned long *bitmap;
unsigned int i, n = 0;
int error = 0;
@@ -934,18 +934,18 @@ static int gpio_aggregator_parse(struct gpio_aggregator *aggr)
if (!bitmap)
return -ENOMEM;
- args = next_arg(args, &name, &p);
+ args = next_arg(args, &key, &p);
while (*args) {
args = next_arg(args, &offsets, &p);
p = get_options(offsets, 0, &error);
if (error == 0 || *p) {
/* Named GPIO line */
- error = gpio_aggregator_add_gpio(aggr, name, U16_MAX, &n);
+ error = gpio_aggregator_add_gpio(aggr, key, U16_MAX, &n);
if (error)
goto free_bitmap;
- name = offsets;
+ key = offsets;
continue;
}
@@ -957,12 +957,12 @@ static int gpio_aggregator_parse(struct gpio_aggregator *aggr)
}
for_each_set_bit(i, bitmap, AGGREGATOR_MAX_GPIOS) {
- error = gpio_aggregator_add_gpio(aggr, name, i, &n);
+ error = gpio_aggregator_add_gpio(aggr, key, i, &n);
if (error)
goto free_bitmap;
}
- args = next_arg(args, &name, &p);
+ args = next_arg(args, &key, &p);
}
if (!n) {
--
2.45.2
More information about the kernel-team
mailing list