]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Introduce to_hci_dev()
authorDavid Herrmann <dh.herrmann@googlemail.com>
Thu, 9 Feb 2012 20:58:30 +0000 (21:58 +0100)
committerJohan Hedberg <johan.hedberg@intel.com>
Mon, 13 Feb 2012 15:01:37 +0000 (17:01 +0200)
commite759e36c880de86d81f74dd83c200e56fc1a23cf
tree704eeeb173b859311ebc23d6881fa40575f43851
parentf6a1b4c27c7088976a28b9beda6dcaebdaa4b2f9
Bluetooth: Introduce to_hci_dev()

We currently use dev_set_drvdata to keep a pointer to ourself. This
doesn't make sense as we are the bus and not a driver. Therefore,
introduce to_hci_dev() so we can get a struct hci_dev pointer from a
struct device pointer.

dev_set/get_drvdata() is reserved for drivers that provide a device and
not for the bus using the device. The bus can use simple pointer
arithmetic to retrieve its private data.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_sysfs.c