aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-07-01 11:24:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-01 11:24:54 -0400
commitfc93274ab5a455b1e31aea5d2c9e8ba1f699fded (patch)
treee9cc70e49331791d16663e2ffc899e11d5f8bce7
parentc0a0c7a4e1200bfea439b9444e6d6b4bede9db23 (diff)
parentc06632ea054c49510efacb42c52aab693c45b7ba (diff)
Merge tag 'gpio-v4.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
Pull last minute fixes for GPIO from Linus Walleij: - Fix another ACPI problem with broken BIOSes. - Filter out the right GPIO events, making a very user-visible bug go away. * tag 'gpio-v4.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: acpi: Skip _AEI entries without a handler rather then aborting the scan gpiolib: fix filtering out unwanted events
-rw-r--r--drivers/gpio/gpiolib-acpi.c2
-rw-r--r--drivers/gpio/gpiolib.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
index 2185232da823..8fa5fcd00e9a 100644
--- a/drivers/gpio/gpiolib-acpi.c
+++ b/drivers/gpio/gpiolib-acpi.c
@@ -201,7 +201,7 @@ static acpi_status acpi_gpiochip_request_interrupt(struct acpi_resource *ares,
201 handler = acpi_gpio_irq_handler_evt; 201 handler = acpi_gpio_irq_handler_evt;
202 } 202 }
203 if (!handler) 203 if (!handler)
204 return AE_BAD_PARAMETER; 204 return AE_OK;
205 205
206 pin = acpi_gpiochip_pin_to_gpio_offset(chip->gpiodev, pin); 206 pin = acpi_gpiochip_pin_to_gpio_offset(chip->gpiodev, pin);
207 if (pin < 0) 207 if (pin < 0)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 5db44139cef8..a42a1eea5714 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -708,7 +708,8 @@ static irqreturn_t lineevent_irq_thread(int irq, void *p)
708 708
709 ge.timestamp = ktime_get_real_ns(); 709 ge.timestamp = ktime_get_real_ns();
710 710
711 if (le->eflags & GPIOEVENT_REQUEST_BOTH_EDGES) { 711 if (le->eflags & GPIOEVENT_REQUEST_RISING_EDGE
712 && le->eflags & GPIOEVENT_REQUEST_FALLING_EDGE) {
712 int level = gpiod_get_value_cansleep(le->desc); 713 int level = gpiod_get_value_cansleep(le->desc);
713 714
714 if (level) 715 if (level)