From: Grygorii Strashko Date: Thu, 25 Sep 2014 16:09:23 +0000 (+0300) Subject: gpiolib: irqchip: use irq_find_mapping while removing irqchip X-Git-Tag: fixes-against-v3.18-rc2~140^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3893386b90500d7f26fec3170bf96f67d3e557e;p=pandora-kernel.git 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: Wang, Yalin Signed-off-by: Grygorii Strashko Signed-off-by: Linus Walleij --- Reading git-diff-tree failed