gpio: altera: Allocate irq_chip dynamically
authorPhil Reid <preid@electromag.com.au>
Mon, 10 Jun 2019 09:50:11 +0000 (17:50 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 10 Jun 2019 14:24:22 +0000 (16:24 +0200)
commit9d373acadaf676e3733ba57c7294ec60e9a358a9
treee0f3875210e0f7883de166b5b736b569a0118f7d
parent1ebd06871b57a632b6624fbd4b680dc7dd8a1283
gpio: altera: Allocate irq_chip dynamically

Keeping the irq_chip definition static shares it with multiple instances
of the altera gpiochip in the system. This is bad and now we get this
warning from gpiolib core:

"detected irqchip that is shared with multiple gpiochips: please fix the
driver."

Hence, move the irq_chip definition from being driver static into the
struct altera_gpio_chips. So a unique irq_chip is used for each gpiochip
instance.

Signed-off-by: Phil Reid <preid@electromag.com.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-altera.c