linux-next: manual merge of the gpio tree with Linus Torlvads' tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx

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: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux