diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2006-07-06 06:38:46 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-28 21:01:25 -0400 |
commit | b219e3ac66183fc9771b94af931fb5fd41d586ec (patch) | |
tree | 671a6a553c6744fce2eb35c6508249cbc616c326 /net/bluetooth/hci_conn.c | |
parent | 4d0eb0049ce94101f7f169f89216ba58475219e2 (diff) |
[Bluetooth] Integrate low-level connections into the driver model
This patch integrates the low-level connections (ACL and SCO) into the
driver model. Every connection is presented as device with the parent
set to its host controller device.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_conn.c')
-rw-r--r-- | net/bluetooth/hci_conn.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 420ed4d7e57e..7e9515b41cc0 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c | |||
@@ -179,6 +179,8 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst) | |||
179 | if (hdev->notify) | 179 | if (hdev->notify) |
180 | hdev->notify(hdev, HCI_NOTIFY_CONN_ADD); | 180 | hdev->notify(hdev, HCI_NOTIFY_CONN_ADD); |
181 | 181 | ||
182 | hci_conn_add_sysfs(conn); | ||
183 | |||
182 | tasklet_enable(&hdev->tx_task); | 184 | tasklet_enable(&hdev->tx_task); |
183 | 185 | ||
184 | return conn; | 186 | return conn; |
@@ -211,6 +213,8 @@ int hci_conn_del(struct hci_conn *conn) | |||
211 | 213 | ||
212 | tasklet_disable(&hdev->tx_task); | 214 | tasklet_disable(&hdev->tx_task); |
213 | 215 | ||
216 | hci_conn_del_sysfs(conn); | ||
217 | |||
214 | hci_conn_hash_del(hdev, conn); | 218 | hci_conn_hash_del(hdev, conn); |
215 | if (hdev->notify) | 219 | if (hdev->notify) |
216 | hdev->notify(hdev, HCI_NOTIFY_CONN_DEL); | 220 | hdev->notify(hdev, HCI_NOTIFY_CONN_DEL); |
@@ -221,7 +225,9 @@ int hci_conn_del(struct hci_conn *conn) | |||
221 | 225 | ||
222 | hci_dev_put(hdev); | 226 | hci_dev_put(hdev); |
223 | 227 | ||
224 | kfree(conn); | 228 | /* will free via device release */ |
229 | put_device(&conn->dev); | ||
230 | |||
225 | return 0; | 231 | return 0; |
226 | } | 232 | } |
227 | 233 | ||