aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-aggregator.c
diff options
context:
space:
mode:
authorKoichiro Den <[email protected]>2025-04-07 04:30:15 +0000
committerBartosz Golaszewski <[email protected]>2025-04-09 14:57:29 +0000
commit4ec2315d7fabeb08e9ad7995bd16f34118e4633b (patch)
tree7a521f0d8e951357e856170ae59fb35eea6a2d4c /drivers/gpio/gpio-aggregator.c
parentgpio: aggregator: introduce basic configfs interface (diff)
downloadkernel-4ec2315d7fabeb08e9ad7995bd16f34118e4633b.tar.gz
kernel-4ec2315d7fabeb08e9ad7995bd16f34118e4633b.zip
gpio: aggregator: rename 'name' to 'key' in gpio_aggregator_parse()
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 <[email protected]> Signed-off-by: Koichiro Den <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
Diffstat (limited to 'drivers/gpio/gpio-aggregator.c')
-rw-r--r--drivers/gpio/gpio-aggregator.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpio/gpio-aggregator.c b/drivers/gpio/gpio-aggregator.c
index e5199de2e815..e8c21ea9a5ea 100644
--- a/drivers/gpio/gpio-aggregator.c
+++ b/drivers/gpio/gpio-aggregator.c
@@ -996,7 +996,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 int i, n = 0;
int error = 0;
@@ -1005,18 +1005,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)
return error;
- name = offsets;
+ key = offsets;
continue;
}
@@ -1028,12 +1028,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)
return error;
}
- args = next_arg(args, &name, &p);
+ args = next_arg(args, &key, &p);
}
if (!n) {