aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2012-01-07 09:47:20 -0500
committerJohan Hedberg <johan.hedberg@intel.com>2012-02-13 10:01:24 -0500
commit587ae086f6e44c3f1d313e3efdfc8c2866784bc3 (patch)
tree71d48b822fb134f03a3d3717a1513a672b994b02
parent797fe796c4335b35d95d5326824513befdb5d1e9 (diff)
Bluetooth: Remove unused hci-destruct cb
The hci-destruct callback is not used by any driver so we can remove it. There is no reason to keep it alive, anymore. Drivers can free their internal data on driver-release and we do not need to provide a public destruct callback. Internally, we still use a destruct callback inside of hci_sysfs.c. This one is used to correctly free our hci_dev data structure if no more users have a reference to it. 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>
-rw-r--r--include/net/bluetooth/hci_core.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 86c74cc563ff..935aca8783c4 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -270,7 +270,6 @@ struct hci_dev {
270 int (*close)(struct hci_dev *hdev); 270 int (*close)(struct hci_dev *hdev);
271 int (*flush)(struct hci_dev *hdev); 271 int (*flush)(struct hci_dev *hdev);
272 int (*send)(struct sk_buff *skb); 272 int (*send)(struct sk_buff *skb);
273 void (*destruct)(struct hci_dev *hdev);
274 void (*notify)(struct hci_dev *hdev, unsigned int evt); 273 void (*notify)(struct hci_dev *hdev, unsigned int evt);
275 int (*ioctl)(struct hci_dev *hdev, unsigned int cmd, unsigned long arg); 274 int (*ioctl)(struct hci_dev *hdev, unsigned int cmd, unsigned long arg);
276}; 275};
@@ -595,10 +594,7 @@ static inline void hci_conn_put(struct hci_conn *conn)
595/* ----- HCI Devices ----- */ 594/* ----- HCI Devices ----- */
596static inline void __hci_dev_put(struct hci_dev *d) 595static inline void __hci_dev_put(struct hci_dev *d)
597{ 596{
598 if (atomic_dec_and_test(&d->refcnt)) { 597 atomic_dec(&d->refcnt);
599 if (d->destruct)
600 d->destruct(d);
601 }
602} 598}
603 599
604/* 600/*