Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2289823c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -413,12 +413,12 @@ void gpiochip_set_chained_irqchip(struct gpio_chip *gpiochip,
		return;
	}

	irq_set_chained_handler(parent_irq, parent_handler);
	/*
	 * The parent irqchip is already using the chip_data for this
	 * irqchip, so our callbacks simply use the handler_data.
	 */
	irq_set_handler_data(parent_irq, gpiochip);
	irq_set_chained_handler(parent_irq, parent_handler);
}
EXPORT_SYMBOL_GPL(gpiochip_set_chained_irqchip);

@@ -1674,7 +1674,7 @@ struct gpio_desc *__must_check __gpiod_get_index(struct device *dev,
		set_bit(FLAG_OPEN_SOURCE, &desc->flags);

	/* No particular flag request, return here... */
	if (flags & GPIOD_FLAGS_BIT_DIR_SET)
	if (!(flags & GPIOD_FLAGS_BIT_DIR_SET))
		return desc;

	/* Process flags */