gliolib: set hooks in gpiochip_set_irq_hooks()
authorHans Verkuil <hans.verkuil@cisco.com>
Sat, 8 Sep 2018 09:23:15 +0000 (11:23 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 10 Sep 2018 06:55:38 +0000 (08:55 +0200)
commitca620f2de153d690d6d6f50f32b8a14dd46107f4
treefc743ff0ca980439c8c28262cec96c56eef26be9
parent4e6b823867e2b8afc2b33740ba930e50b1f92421
gliolib: set hooks in gpiochip_set_irq_hooks()

Centralize setting the irq_request/release_resources callbacks
in one function since we'll be adding more callbacks to that.

Also fix the removal of the callback overrides: this should
only be done if we actually installed our own callback there.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c