Commit 2289823c authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'gpio-v3.17-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull gpio fixes from Linus Walleij:
 "Two GPIO fixes:

   - GPIO direction flags where handled wrong in the new descriptor-
     based API, so direction changes did not always "take".

   - Fix a handler installation race in the generic GPIO irqchip code"

* tag 'gpio-v3.17-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpio: Fix potential NULL handler data in chained irqchip handler
  gpio: Fix gpio direction flags not getting set
parents 4d3afba3 324b0398
...@@ -413,12 +413,12 @@ void gpiochip_set_chained_irqchip(struct gpio_chip *gpiochip, ...@@ -413,12 +413,12 @@ void gpiochip_set_chained_irqchip(struct gpio_chip *gpiochip,
return; return;
} }
irq_set_chained_handler(parent_irq, parent_handler);
/* /*
* The parent irqchip is already using the chip_data for this * The parent irqchip is already using the chip_data for this
* irqchip, so our callbacks simply use the handler_data. * irqchip, so our callbacks simply use the handler_data.
*/ */
irq_set_handler_data(parent_irq, gpiochip); irq_set_handler_data(parent_irq, gpiochip);
irq_set_chained_handler(parent_irq, parent_handler);
} }
EXPORT_SYMBOL_GPL(gpiochip_set_chained_irqchip); EXPORT_SYMBOL_GPL(gpiochip_set_chained_irqchip);
...@@ -1674,7 +1674,7 @@ struct gpio_desc *__must_check __gpiod_get_index(struct device *dev, ...@@ -1674,7 +1674,7 @@ struct gpio_desc *__must_check __gpiod_get_index(struct device *dev,
set_bit(FLAG_OPEN_SOURCE, &desc->flags); set_bit(FLAG_OPEN_SOURCE, &desc->flags);
/* No particular flag request, return here... */ /* No particular flag request, return here... */
if (flags & GPIOD_FLAGS_BIT_DIR_SET) if (!(flags & GPIOD_FLAGS_BIT_DIR_SET))
return desc; return desc;
/* Process flags */ /* Process flags */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment