* linux-next: manual merge of the gpio tree with Linus Torlvads' tree
@ 2014-10-01 5:58 Stephen Rothwell
0 siblings, 0 replies; only message in thread
From: Stephen Rothwell @ 2014-10-01 5:58 UTC (permalink / raw)
To: Linus Walleij; +Cc: linux-next, linux-kernel, Jarkko Nikula
[-- Attachment #1: Type: text/plain, Size: 1760 bytes --]
Hi Linus,
Today's linux-next merge of the gpio tree got a conflict in
drivers/gpio/gpiolib.c between commit 324b0398781e ("gpio: Fix
potential NULL handler data in chained irqchip handler") from Linus
Torvalds' tree and commit 3f97d5fcf99c ("gpio: handle also nested
irqchips in the chained handler set-up") from the gpio tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell sfr@canb•auug.org.au
diff --cc drivers/gpio/gpiolib.c
index c68d037de656,6e00c82be142..000000000000
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@@ -413,12 -407,25 +407,25 @@@ void gpiochip_set_chained_irqchip(struc
return;
}
- /*
- * 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);
+ if (parent_handler) {
+ if (gpiochip->can_sleep) {
+ chip_err(gpiochip,
+ "you cannot have chained interrupts on a "
+ "chip that may sleep\n");
+ 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);
+ }
+
+ /* Set the parent IRQ for all affected IRQs */
+ for (offset = 0; offset < gpiochip->ngpio; offset++)
+ irq_set_parent(irq_find_mapping(gpiochip->irqdomain, offset),
+ parent_irq);
}
EXPORT_SYMBOL_GPL(gpiochip_set_chained_irqchip);
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-10-01 5:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-01 5:58 linux-next: manual merge of the gpio tree with Linus Torlvads' tree Stephen Rothwell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox