drivers:misc: ti-st: protect registrations
authorPavan Savoy <pavan_savoy@ti.com>
Thu, 15 Dec 2011 16:38:20 +0000 (10:38 -0600)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 4 Jan 2012 23:21:03 +0000 (15:21 -0800)
commitbfb88d6c91a2cf507ff7763ebec94d72b4c98b07
treeddb098bbb0ee412d6121d2e22061850d602b0a30
parent1ff97647f066aef72ae68042c9abc4a837a12e6d
drivers:misc: ti-st: protect registrations

Concurrent access to UART2/combo-interface by multiple protocol drivers such
as BT, FM and GPS caused issues during firmware download failure cases or
cases when the firmware download took longer than usual.

This was because of un-safe access to protos_registered & st_states.
Protecting this will also make the registration complete callback un-safe for
sleep.

Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/misc/ti-st/st_core.c