[PATCH 03/10] gpiolib: rename local gpio-line-names variable
Ahmad Fatoum
a.fatoum at pengutronix.de
Tue Jun 13 00:38:04 PDT 2023
On 02.06.23 09:49, Marco Felsch wrote:
> This is just a cosmetic commit to align the code more with the Linux
> kernel.
>
> Signed-off-by: Marco Felsch <m.felsch at pengutronix.de>
Reviewed-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
> ---
> drivers/gpio/gpiolib.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> index 0df43c9f8f..eb2bba042e 100644
> --- a/drivers/gpio/gpiolib.c
> +++ b/drivers/gpio/gpiolib.c
> @@ -524,10 +524,10 @@ static int of_gpiochip_scan_hogs(struct gpio_chip *chip)
> "gpio-line-names");
>
> if (count > 0) {
> - const char **arr = xzalloc(count * sizeof(char *));
> + const char **names = xzalloc(count * sizeof(char *));
>
> of_property_read_string_array(chip->dev->of_node,
> - "gpio-line-names", arr, count);
> + "gpio-line-names", names, count);
>
> /*
> * Since property 'gpio-line-names' cannot contains gaps, we
> @@ -538,9 +538,9 @@ static int of_gpiochip_scan_hogs(struct gpio_chip *chip)
> count = chip->ngpio;
>
> for (i = 0; i < count; i++)
> - gpio_desc[chip->base + i].name = xstrdup(arr[i]);
> + gpio_desc[chip->base + i].name = xstrdup(names[i]);
>
> - free(arr);
> + free(names);
> }
>
> for_each_available_child_of_node(chip->dev->of_node, np) {
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list