]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Add l2cap_state_change_and_error()
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>
Tue, 15 Oct 2013 22:24:46 +0000 (19:24 -0300)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 15 Oct 2013 23:42:44 +0000 (16:42 -0700)
commitf1a6c3f4ef8b2b507a7ee4a2b94a737f25fd3be2
tree84aac391f8318e1771140401c9ea109f516fdc09
parent430a3fced9f78390d246b665293584e3396d3933
Bluetooth: Add l2cap_state_change_and_error()

l2cap_state_change_and_error() introduces the ability to update a
l2cap_user with changes in channel's state and error code with just one
call. The main reason for this is to avoid race conditions between and
setting the state and then the error. Otherwise we would need to release
the lock between both operations.

This is another step of an ongoing work to make l2cap_core.c totally
independent from l2cap's struct sock.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/l2cap_core.c