Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio/rockchip: Convert to generic_handle_domain_irq()

Follow commit dbd1c54fc820 ("gpio: Bulk conversion to
generic_handle_domain_irq()").

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>

authored by

Jeffy Chen and committed by
Bartosz Golaszewski
b98dbd82 66df18b3

+5 -16
+5 -16
drivers/gpio/gpio-rockchip.c
··· 325 325 { 326 326 struct irq_chip *chip = irq_desc_get_chip(desc); 327 327 struct rockchip_pin_bank *bank = irq_desc_get_handler_data(desc); 328 - u32 pend; 328 + unsigned long pending; 329 + unsigned int irq; 329 330 330 331 dev_dbg(bank->dev, "got irq for bank %s\n", bank->name); 331 332 332 333 chained_irq_enter(chip, desc); 333 334 334 - pend = readl_relaxed(bank->reg_base + bank->gpio_regs->int_status); 335 - 336 - while (pend) { 337 - unsigned int irq, virq; 338 - 339 - irq = __ffs(pend); 340 - pend &= ~BIT(irq); 341 - virq = irq_find_mapping(bank->domain, irq); 342 - 343 - if (!virq) { 344 - dev_err(bank->dev, "unmapped irq %d\n", irq); 345 - continue; 346 - } 347 - 335 + pending = readl_relaxed(bank->reg_base + bank->gpio_regs->int_status); 336 + for_each_set_bit(irq, &pending, 32) { 348 337 dev_dbg(bank->dev, "handling irq %d\n", irq); 349 338 350 339 /* ··· 367 378 } while ((data & BIT(irq)) != (data_old & BIT(irq))); 368 379 } 369 380 370 - generic_handle_irq(virq); 381 + generic_handle_domain_irq(bank->domain, irq); 371 382 } 372 383 373 384 chained_irq_exit(chip, desc);