Bluetooth: mgmt: Move command handlers into a table
authorJohan Hedberg <johan.hedberg@intel.com>
Tue, 28 Feb 2012 15:18:30 +0000 (17:18 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 1 Mar 2012 21:55:58 +0000 (23:55 +0200)
By moving the command handlers into a table (the index being equal to
the opcode) the lookup is made a bit more efficient. Having a struct to
describe each handler also paves the way to add more meta-data for each
handler, e.g. the minimum message size for the command and allow
handling of common tasks like this in a centralized place.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>

No differences found