summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpiolib-acpi.c
diff options
context:
space:
mode:
authorQipeng Zha <qipeng.zha@intel.com>2015-04-10 01:25:10 +0300
committerLinus Walleij <linus.walleij@linaro.org>2015-04-27 16:20:33 +0300
commita4811622fea15fdc78102069f573061fc87f3570 (patch)
treeae75c75858ce38f2b185d34d02bbf17e15d2c029 /drivers/gpio/gpiolib-acpi.c
parentb787f68c36d49bb1d9236f403813641efa74a031 (diff)
downloadlinux-a4811622fea15fdc78102069f573061fc87f3570.tar.xz
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 <dcb314@hotmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Qipeng Zha <qipeng.zha@intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpiolib-acpi.c')
-rw-r--r--drivers/gpio/gpiolib-acpi.c2
1 files changed, 1 insertions, 1 deletions
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;