HID: sensor-hub: make dyn_callback_lock IRQ-safe
authorJiri Kosina <jkosina@suse.cz>
Tue, 10 Jun 2014 09:05:43 +0000 (11:05 +0200)
committerJiri Kosina <jkosina@suse.cz>
Tue, 10 Jun 2014 09:05:43 +0000 (11:05 +0200)
commit0ccf091d1fbc1f99bb7f93bff8cf346769a9b0cd
tree6423de601e8ee6eb56bc79403d6a05351e735ade
parentd6b92c2c373e0beefa8048c1448992cd5cda6e07
HID: sensor-hub: make dyn_callback_lock IRQ-safe

dyn_callback_lock is being taken from IRQ context through hid_irq_in() ->
hid_input_report() -> sensor_hub_raw_event() -> sensor_hub_get_callback(),
therefore anyone else acquiring it needs to disable IRQs to disable deadlocks.

Reported-by: Alexander Holler <holler@ahsoftware.de>
Tested-by: Alexander Holler <holler@ahsoftware.de>
Reported-by: Reyad Attiyat <reyad.attiyat@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-sensor-hub.c