]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
gpio: pca953x: fix irq_domain_add_simple usage
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Wed, 3 Apr 2013 17:40:14 +0000 (19:40 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 11 Apr 2013 17:01:19 +0000 (19:01 +0200)
commite7a7f972f9120a7985d38a2be8c540047c94392f
tree7b054a5e516a0ea9fbaa701ecf74878c92a1ea3c
parent31880c37c11e28cb81c70757e38392b42e695dc6
gpio: pca953x: fix irq_domain_add_simple usage

We actually have to pass chip as the host_data parameter of
irq_domain_add_simple() as later on, it is used to initialize chip_data
in pca953x_gpio_irq_map(). Failing to do so is leading to a NULL pointer
dereference after calling irq_data_get_irq_chip_data() in
pca953x_irq_mask(), pca953x_irq_unmask(), pca953x_irq_bus_lock(),
pca953x_irq_bus_sync_unlock() and pca953x_irq_set_type().

Fixes regression introduced by commit
0e8f2fdacf1d44651aa7e57063c76142d1f4988b (gpio: pca953x: use simple
irqdomain)

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-pca953x.c