HID: sensor-hub: make dyn_callback_lock IRQ-safe
authorJiri Kosina <[email protected]>
Tue, 10 Jun 2014 09:05:43 +0000 (11:05 +0200)
committerJiri Kosina <[email protected]>
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 <[email protected]>
Tested-by: Alexander Holler <[email protected]>
Reported-by: Reyad Attiyat <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
drivers/hid/hid-sensor-hub.c