]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sunxi: gpio: Rename GPIOs to include a 'P' prefix
authorSimon Glass <sjg@chromium.org>
Sat, 18 Apr 2015 17:33:44 +0000 (11:33 -0600)
committerHans de Goede <hdegoede@redhat.com>
Mon, 4 May 2015 14:51:52 +0000 (16:51 +0200)
By convention, sunxi GPIOs are named PA1, PA2 instead of A1, A2. Change
the driver model GPIO driver for sunxi to use these names.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/gpio/sunxi_gpio.c

index cf5c62463ea12518751a38ffbc11712f3b421b18..29301c43d092a9e70de35c817cc41bab127f4877 100644 (file)
@@ -249,10 +249,11 @@ static char *gpio_bank_name(int bank)
 {
        char *name;
 
-       name = malloc(2);
+       name = malloc(3);
        if (name) {
-               name[0] = 'A' + bank;
-               name[1] = '\0';
+               name[0] = 'P';
+               name[1] = 'A' + bank;
+               name[2] = '\0';
        }
 
        return name;