diff options
Diffstat (limited to 'drivers/gpio')
| -rw-r--r-- | drivers/gpio/gpio-mpc8xxx.c | 2 | ||||
| -rw-r--r-- | drivers/gpio/gpio-syscon.c | 2 | ||||
| -rw-r--r-- | drivers/gpio/gpiolib-acpi.c | 10 |
3 files changed, 12 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index a6952ba343a8..a65b75161aa4 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b/drivers/gpio/gpio-mpc8xxx.c | |||
| @@ -334,7 +334,7 @@ static struct irq_domain_ops mpc8xxx_gpio_irq_ops = { | |||
| 334 | .xlate = irq_domain_xlate_twocell, | 334 | .xlate = irq_domain_xlate_twocell, |
| 335 | }; | 335 | }; |
| 336 | 336 | ||
| 337 | static struct of_device_id mpc8xxx_gpio_ids[] __initdata = { | 337 | static struct of_device_id mpc8xxx_gpio_ids[] = { |
| 338 | { .compatible = "fsl,mpc8349-gpio", }, | 338 | { .compatible = "fsl,mpc8349-gpio", }, |
| 339 | { .compatible = "fsl,mpc8572-gpio", }, | 339 | { .compatible = "fsl,mpc8572-gpio", }, |
| 340 | { .compatible = "fsl,mpc8610-gpio", }, | 340 | { .compatible = "fsl,mpc8610-gpio", }, |
diff --git a/drivers/gpio/gpio-syscon.c b/drivers/gpio/gpio-syscon.c index 257e2989215c..045a952576c7 100644 --- a/drivers/gpio/gpio-syscon.c +++ b/drivers/gpio/gpio-syscon.c | |||
| @@ -219,7 +219,7 @@ static int syscon_gpio_probe(struct platform_device *pdev) | |||
| 219 | ret = of_property_read_u32_index(np, "gpio,syscon-dev", 2, | 219 | ret = of_property_read_u32_index(np, "gpio,syscon-dev", 2, |
| 220 | &priv->dir_reg_offset); | 220 | &priv->dir_reg_offset); |
| 221 | if (ret) | 221 | if (ret) |
| 222 | dev_err(dev, "can't read the dir register offset!\n"); | 222 | dev_dbg(dev, "can't read the dir register offset!\n"); |
| 223 | 223 | ||
| 224 | priv->dir_reg_offset <<= 3; | 224 | priv->dir_reg_offset <<= 3; |
| 225 | } | 225 | } |
diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c index c0929d938ced..df990f29757a 100644 --- a/drivers/gpio/gpiolib-acpi.c +++ b/drivers/gpio/gpiolib-acpi.c | |||
| @@ -201,6 +201,10 @@ static acpi_status acpi_gpiochip_request_interrupt(struct acpi_resource *ares, | |||
| 201 | if (!handler) | 201 | if (!handler) |
| 202 | return AE_BAD_PARAMETER; | 202 | return AE_BAD_PARAMETER; |
| 203 | 203 | ||
| 204 | pin = acpi_gpiochip_pin_to_gpio_offset(chip, pin); | ||
| 205 | if (pin < 0) | ||
| 206 | return AE_BAD_PARAMETER; | ||
| 207 | |||
| 204 | desc = gpiochip_request_own_desc(chip, pin, "ACPI:Event"); | 208 | desc = gpiochip_request_own_desc(chip, pin, "ACPI:Event"); |
| 205 | if (IS_ERR(desc)) { | 209 | if (IS_ERR(desc)) { |
| 206 | dev_err(chip->dev, "Failed to request GPIO\n"); | 210 | dev_err(chip->dev, "Failed to request GPIO\n"); |
| @@ -551,6 +555,12 @@ acpi_gpio_adr_space_handler(u32 function, acpi_physical_address address, | |||
| 551 | struct gpio_desc *desc; | 555 | struct gpio_desc *desc; |
| 552 | bool found; | 556 | bool found; |
| 553 | 557 | ||
| 558 | pin = acpi_gpiochip_pin_to_gpio_offset(chip, pin); | ||
| 559 | if (pin < 0) { | ||
| 560 | status = AE_BAD_PARAMETER; | ||
| 561 | goto out; | ||
| 562 | } | ||
| 563 | |||
| 554 | mutex_lock(&achip->conn_lock); | 564 | mutex_lock(&achip->conn_lock); |
| 555 | 565 | ||
| 556 | found = false; | 566 | found = false; |
