OSDN Git Service

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 12:00:14 +0000 (14:00 +0200)
commit63e1acc84d28d73107e72482e33dcca152bb5ea4
tree2b295df86fc85d8af62ccf4527f63a4d07d08e46
parent20e448f2251c0a78421889267b3709758c544ff2
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/supply/bq24190_charger.c