From: Simon Glass Date: Sat, 18 Apr 2015 17:33:44 +0000 (-0600) Subject: sunxi: gpio: Rename GPIOs to include a 'P' prefix X-Git-Tag: v2015.07-rc1~6^2~26 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=07ce60f3cd21de20576e69ba10beabc905643500;p=u-boot sunxi: gpio: Rename GPIOs to include a 'P' prefix 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 Acked-by: Hans de Goede Signed-off-by: Hans de Goede --- diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c index cf5c62463e..29301c43d0 100644 --- a/drivers/gpio/sunxi_gpio.c +++ b/drivers/gpio/sunxi_gpio.c @@ -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;