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-Url: https://git.stricted.de/?a=commitdiff_plain;h=a4811622fea15fdc78102069f573061fc87f3570;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.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;