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

Skip to content
Commit e3893386 authored by Grygorii Strashko's avatar Grygorii Strashko Committed by Linus Walleij
Browse files

gpiolib: irqchip: use irq_find_mapping while removing irqchip



There is no guarantee that VIRQs will be allocated sequentially
for gpio irqchip in gpiochip_irqchip_add().
Therefore, it's unsafe to dispose VIRQ in gpiochip_irqchip_remove()
basing on index relatively to stored irq_base value.

Hence, use irq_find_mapping for VIRQ finding  in gpiochip_irqchip_remove()
instead of irq_base + index.

Reported-by: default avatarWang, Yalin <Yalin.Wang@sonymobile.com>
Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent dcdc3018
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment