From: Qipeng Zha Date: Thu, 9 Apr 2015 22:25:10 +0000 (+0800) Subject: gpiolib: change gpio pin from unsigned to signed in acpi callback X-Git-Tag: omap-for-v4.2/omap1-v2~19^2~4 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4811622fea15fdc78102069f573061fc87f3570;p=pandora-kernel.git gpiolib: change gpio pin from unsigned to signed in acpi callback The signed error will be wrongly used as valid gpio offset Reported-by: David Binderman Signed-off-by: Alan Cox Signed-off-by: Qipeng Zha Acked-by: Mika Westerberg Signed-off-by: Linus Walleij --- diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c index d2303d50f561..725d16138b74 100644 --- a/drivers/gpio/gpiolib-acpi.c +++ b/drivers/gpio/gpiolib-acpi.c @@ -550,7 +550,7 @@ acpi_gpio_adr_space_handler(u32 function, acpi_physical_address address, length = min(agpio->pin_table_length, (u16)(pin_index + bits)); for (i = pin_index; i < length; ++i) { - unsigned pin = agpio->pin_table[i]; + int pin = agpio->pin_table[i]; struct acpi_gpio_connection *conn; struct gpio_desc *desc; bool found;