]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Refactor hci_disconn_complete_evt
authorAndre Guedes <andre.guedes@openbossa.org>
Thu, 7 Nov 2013 20:36:10 +0000 (17:36 -0300)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Wed, 4 Dec 2013 13:09:04 +0000 (11:09 -0200)
commit9843b7cf119886da8b121d1a9659fad124a02b5c
tree885feba756eed1a596f0c2d4ec68c67fb71561dc
parentd8a801b644170aa17e315f572d723dcf60475509
Bluetooth: Refactor hci_disconn_complete_evt

hci_disconn_complete_evt() logic is more complicated than what it
should be, making it hard to follow and add new features.

So this patch does some code refactoring by handling the error cases
in the beginning of the function and by moving the main flow into the
first level of function scope. No change is done in the event handling
logic itself.

Besides organizing this messy code, this patch makes easier to add
code for handling LE auto connection (which will be added in a further
patch).

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/hci_event.c