power: supply: bq24190_charger: Install irq_handler_thread() at end of probe()
authorLiam Breck <liam@networkimprov.net>
Wed, 18 Jan 2017 17:26:50 +0000 (09:26 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 14 May 2017 11:32:54 +0000 (13:32 +0200)
commit397cad3a37378fe6619578ab16db51ed879a4688
treeeca8d752b6dceb36ecaf7486d58ce8ca1e4ed17c
parent760d62e94017b55368a0905f36d47c5035c83b84
power: supply: bq24190_charger: Install irq_handler_thread() at end of probe()

commit d62acc5ef0621463446091ebd7a345e06e9ab80c upstream.

The device specific data is not fully initialized on
request_threaded_irq(). This may cause a crash when the IRQ handler
tries to reference them.

Fix the issue by installing IRQ handler at the end of the probe.

Fixes: d7bf353fd0aa3 ("bq24190_charger: Add support for TI BQ24190 Battery Charger")
Signed-off-by: Liam Breck <kernel@networkimprov.net>
Acked-by: Mark Greer <mgreer@animalcreek.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/power/bq24190_charger.c