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

Commit f9ea14ef authored by Feng Tang's avatar Feng Tang Committed by Grant Likely
Browse files

gpio-ml-ioh: fix a bug in the interrupt handler



GPIO's irq action's dev_id is set to the first struct ioh_gpio chip,
so when loop checking the 8 chips, the "chip" should be changed
according.

Signed-off-by: default avatarFeng Tang <feng.tang@intel.com>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent b2888095
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -339,7 +339,7 @@ static irqreturn_t ioh_gpio_handler(int irq, void *dev_id)
	int i, j;
	int i, j;
	int ret = IRQ_NONE;
	int ret = IRQ_NONE;


	for (i = 0; i < 8; i++) {
	for (i = 0; i < 8; i++, chip++) {
		reg_val = ioread32(&chip->reg->regs[i].istatus);
		reg_val = ioread32(&chip->reg->regs[i].istatus);
		for (j = 0; j < num_ports[i]; j++) {
		for (j = 0; j < num_ports[i]; j++) {
			if (reg_val & BIT(j)) {
			if (reg_val & BIT(j)) {