summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorrmind <rmind@NetBSD.org>2014-05-20 18:25:54 +0000
committerrmind <rmind@NetBSD.org>2014-05-20 18:25:54 +0000
commit8db4ab2614a04d2f5be56bde4655dfbda0a0d672 (patch)
tree83b980d0b22d0796f263673c580ed102ad1e0b9e /sys/dev
parent4a74c3c14eb9e24d5578260dfdda603be72733fb (diff)
netbt: rename some attach/detach functions to have _pcb suffix, so
we could use standard attach/detach naming for pr_usrreq functions. No functional change.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/bluetooth/bcsp.c8
-rw-r--r--sys/dev/bluetooth/bthidev.c34
-rw-r--r--sys/dev/bluetooth/btmagic.c30
-rw-r--r--sys/dev/bluetooth/btsco.c34
-rw-r--r--sys/dev/bluetooth/btuart.c8
-rw-r--r--sys/dev/pcmcia/bt3c.c12
-rw-r--r--sys/dev/pcmcia/btbc.c12
-rw-r--r--sys/dev/sdmmc/sbt.c8
-rw-r--r--sys/dev/usb/ubt.c14
9 files changed, 80 insertions, 80 deletions
diff --git a/sys/dev/bluetooth/bcsp.c b/sys/dev/bluetooth/bcsp.c
index 73920fd810d..61057a63384 100644
--- a/sys/dev/bluetooth/bcsp.c
+++ b/sys/dev/bluetooth/bcsp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bcsp.c,v 1.23 2014/02/25 18:30:09 pooka Exp $ */
+/* $NetBSD: bcsp.c,v 1.24 2014/05/20 18:25:54 rmind Exp $ */
/*
* Copyright (c) 2007 KIYOHARA Takashi
* All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcsp.c,v 1.23 2014/02/25 18:30:09 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcsp.c,v 1.24 2014/05/20 18:25:54 rmind Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -285,7 +285,7 @@ bcsp_attach(device_t parent __unused, device_t self, void *aux __unused)
MBUFQ_INIT(&sc->sc_scoq);
/* Attach Bluetooth unit */
- sc->sc_unit = hci_attach(&bcsp_hci, self, 0);
+ sc->sc_unit = hci_attach_pcb(&bcsp_hci, self, 0);
if ((rc = sysctl_createv(&sc->sc_log, 0, NULL, &node,
0, CTLTYPE_NODE, device_xname(self),
@@ -345,7 +345,7 @@ bcsp_detach(device_t self, int flags __unused)
struct bcsp_softc *sc = device_private(self);
if (sc->sc_unit != NULL) {
- hci_detach(sc->sc_unit);
+ hci_detach_pcb(sc->sc_unit);
sc->sc_unit = NULL;
}
diff --git a/sys/dev/bluetooth/bthidev.c b/sys/dev/bluetooth/bthidev.c
index e4ddf232253..fbbf81184d5 100644
--- a/sys/dev/bluetooth/bthidev.c
+++ b/sys/dev/bluetooth/bthidev.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bthidev.c,v 1.24 2012/12/20 11:17:47 plunky Exp $ */
+/* $NetBSD: bthidev.c,v 1.25 2014/05/20 18:25:54 rmind Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bthidev.c,v 1.24 2012/12/20 11:17:47 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bthidev.c,v 1.25 2014/05/20 18:25:54 rmind Exp $");
#include <sys/param.h>
#include <sys/condvar.h>
@@ -358,27 +358,27 @@ bthidev_detach(device_t self, int flags)
/* release interrupt listen */
if (sc->sc_int_l != NULL) {
- l2cap_detach(&sc->sc_int_l);
+ l2cap_detach_pcb(&sc->sc_int_l);
sc->sc_int_l = NULL;
}
/* release control listen */
if (sc->sc_ctl_l != NULL) {
- l2cap_detach(&sc->sc_ctl_l);
+ l2cap_detach_pcb(&sc->sc_ctl_l);
sc->sc_ctl_l = NULL;
}
/* close interrupt channel */
if (sc->sc_int != NULL) {
l2cap_disconnect(sc->sc_int, 0);
- l2cap_detach(&sc->sc_int);
+ l2cap_detach_pcb(&sc->sc_int);
sc->sc_int = NULL;
}
/* close control channel */
if (sc->sc_ctl != NULL) {
l2cap_disconnect(sc->sc_ctl, 0);
- l2cap_detach(&sc->sc_ctl);
+ l2cap_detach_pcb(&sc->sc_ctl);
sc->sc_ctl = NULL;
}
@@ -499,7 +499,7 @@ bthidev_listen(struct bthidev_softc *sc)
/*
* Listen on control PSM
*/
- err = l2cap_attach(&sc->sc_ctl_l, &bthidev_ctl_proto, sc);
+ err = l2cap_attach_pcb(&sc->sc_ctl_l, &bthidev_ctl_proto, sc);
if (err)
return err;
@@ -519,7 +519,7 @@ bthidev_listen(struct bthidev_softc *sc)
/*
* Listen on interrupt PSM
*/
- err = l2cap_attach(&sc->sc_int_l, &bthidev_int_proto, sc);
+ err = l2cap_attach_pcb(&sc->sc_int_l, &bthidev_int_proto, sc);
if (err)
return err;
@@ -556,7 +556,7 @@ bthidev_connect(struct bthidev_softc *sc)
sa.bt_len = sizeof(sa);
sa.bt_family = AF_BLUETOOTH;
- err = l2cap_attach(&sc->sc_ctl, &bthidev_ctl_proto, sc);
+ err = l2cap_attach_pcb(&sc->sc_ctl, &bthidev_ctl_proto, sc);
if (err) {
aprint_error_dev(sc->sc_dev, "l2cap_attach failed (%d)\n", err);
return err;
@@ -679,14 +679,14 @@ bthidev_process_one(struct bthidev_softc *sc, struct mbuf *m)
/* close interrupt channel */
if (sc->sc_int != NULL) {
l2cap_disconnect(sc->sc_int, 0);
- l2cap_detach(&sc->sc_int);
+ l2cap_detach_pcb(&sc->sc_int);
sc->sc_int = NULL;
}
/* close control channel */
if (sc->sc_ctl != NULL) {
l2cap_disconnect(sc->sc_ctl, 0);
- l2cap_detach(&sc->sc_ctl);
+ l2cap_detach_pcb(&sc->sc_ctl);
sc->sc_ctl = NULL;
}
mutex_exit(bt_lock);
@@ -734,7 +734,7 @@ bthidev_ctl_connected(void *arg)
if (sc->sc_flags & BTHID_CONNECTING) {
/* initiate connect on interrupt PSM */
- err = l2cap_attach(&sc->sc_int, &bthidev_int_proto, sc);
+ err = l2cap_attach_pcb(&sc->sc_int, &bthidev_int_proto, sc);
if (err)
goto fail;
@@ -762,7 +762,7 @@ bthidev_ctl_connected(void *arg)
return;
fail:
- l2cap_detach(&sc->sc_ctl);
+ l2cap_detach_pcb(&sc->sc_ctl);
sc->sc_ctl = NULL;
aprint_error_dev(sc->sc_dev, "connect failed (%d)\n", err);
@@ -799,7 +799,7 @@ bthidev_ctl_disconnected(void *arg, int err)
struct bthidev_softc *sc = arg;
if (sc->sc_ctl != NULL) {
- l2cap_detach(&sc->sc_ctl);
+ l2cap_detach_pcb(&sc->sc_ctl);
sc->sc_ctl = NULL;
}
@@ -831,7 +831,7 @@ bthidev_int_disconnected(void *arg, int err)
struct bthidev_softc *sc = arg;
if (sc->sc_int != NULL) {
- l2cap_detach(&sc->sc_int);
+ l2cap_detach_pcb(&sc->sc_int);
sc->sc_int = NULL;
}
@@ -884,7 +884,7 @@ bthidev_ctl_newconn(void *arg, struct sockaddr_bt *laddr,
return NULL;
}
- l2cap_attach(&sc->sc_ctl, &bthidev_ctl_proto, sc);
+ l2cap_attach_pcb(&sc->sc_ctl, &bthidev_ctl_proto, sc);
return sc->sc_ctl;
}
@@ -910,7 +910,7 @@ bthidev_int_newconn(void *arg, struct sockaddr_bt *laddr,
return NULL;
}
- l2cap_attach(&sc->sc_int, &bthidev_int_proto, sc);
+ l2cap_attach_pcb(&sc->sc_int, &bthidev_int_proto, sc);
return sc->sc_int;
}
diff --git a/sys/dev/bluetooth/btmagic.c b/sys/dev/bluetooth/btmagic.c
index dcd9ffbee95..4038c7a193c 100644
--- a/sys/dev/bluetooth/btmagic.c
+++ b/sys/dev/bluetooth/btmagic.c
@@ -1,4 +1,4 @@
-/* $NetBSD: btmagic.c,v 1.6 2014/02/25 18:30:09 pooka Exp $ */
+/* $NetBSD: btmagic.c,v 1.7 2014/05/20 18:25:54 rmind Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -85,7 +85,7 @@
*****************************************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: btmagic.c,v 1.6 2014/02/25 18:30:09 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: btmagic.c,v 1.7 2014/05/20 18:25:54 rmind Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -401,27 +401,27 @@ btmagic_detach(device_t self, int flags)
/* release interrupt listen */
if (sc->sc_int_l != NULL) {
- l2cap_detach(&sc->sc_int_l);
+ l2cap_detach_pcb(&sc->sc_int_l);
sc->sc_int_l = NULL;
}
/* release control listen */
if (sc->sc_ctl_l != NULL) {
- l2cap_detach(&sc->sc_ctl_l);
+ l2cap_detach_pcb(&sc->sc_ctl_l);
sc->sc_ctl_l = NULL;
}
/* close interrupt channel */
if (sc->sc_int != NULL) {
l2cap_disconnect(sc->sc_int, 0);
- l2cap_detach(&sc->sc_int);
+ l2cap_detach_pcb(&sc->sc_int);
sc->sc_int = NULL;
}
/* close control channel */
if (sc->sc_ctl != NULL) {
l2cap_disconnect(sc->sc_ctl, 0);
- l2cap_detach(&sc->sc_ctl);
+ l2cap_detach_pcb(&sc->sc_ctl);
sc->sc_ctl = NULL;
}
@@ -463,7 +463,7 @@ btmagic_listen(struct btmagic_softc *sc)
/*
* Listen on control PSM
*/
- err = l2cap_attach(&sc->sc_ctl_l, &btmagic_ctl_proto, sc);
+ err = l2cap_attach_pcb(&sc->sc_ctl_l, &btmagic_ctl_proto, sc);
if (err)
return err;
@@ -483,7 +483,7 @@ btmagic_listen(struct btmagic_softc *sc)
/*
* Listen on interrupt PSM
*/
- err = l2cap_attach(&sc->sc_int_l, &btmagic_int_proto, sc);
+ err = l2cap_attach_pcb(&sc->sc_int_l, &btmagic_int_proto, sc);
if (err)
return err;
@@ -519,7 +519,7 @@ btmagic_connect(struct btmagic_softc *sc)
sa.bt_len = sizeof(sa);
sa.bt_family = AF_BLUETOOTH;
- err = l2cap_attach(&sc->sc_ctl, &btmagic_ctl_proto, sc);
+ err = l2cap_attach_pcb(&sc->sc_ctl, &btmagic_ctl_proto, sc);
if (err) {
printf("%s: l2cap_attach failed (%d)\n",
device_xname(sc->sc_dev), err);
@@ -811,7 +811,7 @@ btmagic_ctl_connected(void *arg)
if (ISSET(sc->sc_flags, BTMAGIC_CONNECTING)) {
/* initiate connect on interrupt PSM */
- err = l2cap_attach(&sc->sc_int, &btmagic_int_proto, sc);
+ err = l2cap_attach_pcb(&sc->sc_int, &btmagic_int_proto, sc);
if (err)
goto fail;
@@ -839,7 +839,7 @@ btmagic_ctl_connected(void *arg)
return;
fail:
- l2cap_detach(&sc->sc_ctl);
+ l2cap_detach_pcb(&sc->sc_ctl);
sc->sc_ctl = NULL;
printf("%s: connect failed (%d)\n", device_xname(sc->sc_dev), err);
@@ -877,7 +877,7 @@ btmagic_ctl_disconnected(void *arg, int err)
struct btmagic_softc *sc = arg;
if (sc->sc_ctl != NULL) {
- l2cap_detach(&sc->sc_ctl);
+ l2cap_detach_pcb(&sc->sc_ctl);
sc->sc_ctl = NULL;
}
@@ -903,7 +903,7 @@ btmagic_int_disconnected(void *arg, int err)
struct btmagic_softc *sc = arg;
if (sc->sc_int != NULL) {
- l2cap_detach(&sc->sc_int);
+ l2cap_detach_pcb(&sc->sc_int);
sc->sc_int = NULL;
}
@@ -950,7 +950,7 @@ btmagic_ctl_newconn(void *arg, struct sockaddr_bt *laddr,
return NULL;
}
- l2cap_attach(&sc->sc_ctl, &btmagic_ctl_proto, sc);
+ l2cap_attach_pcb(&sc->sc_ctl, &btmagic_ctl_proto, sc);
return sc->sc_ctl;
}
@@ -976,7 +976,7 @@ btmagic_int_newconn(void *arg, struct sockaddr_bt *laddr,
return NULL;
}
- l2cap_attach(&sc->sc_int, &btmagic_int_proto, sc);
+ l2cap_attach_pcb(&sc->sc_int, &btmagic_int_proto, sc);
return sc->sc_int;
}
diff --git a/sys/dev/bluetooth/btsco.c b/sys/dev/bluetooth/btsco.c
index 34fb2e29c58..6ecea36e744 100644
--- a/sys/dev/bluetooth/btsco.c
+++ b/sys/dev/bluetooth/btsco.c
@@ -1,4 +1,4 @@
-/* $NetBSD: btsco.c,v 1.28 2012/04/03 09:32:53 plunky Exp $ */
+/* $NetBSD: btsco.c,v 1.29 2014/05/20 18:25:54 rmind Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: btsco.c,v 1.28 2012/04/03 09:32:53 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: btsco.c,v 1.29 2014/05/20 18:25:54 rmind Exp $");
#include <sys/param.h>
#include <sys/audioio.h>
@@ -360,13 +360,13 @@ btsco_detach(device_t self, int flags)
if (sc->sc_sco != NULL) {
DPRINTF("sc_sco=%p\n", sc->sc_sco);
sco_disconnect(sc->sc_sco, 0);
- sco_detach(&sc->sc_sco);
+ sco_detach_pcb(&sc->sc_sco);
sc->sc_sco = NULL;
}
if (sc->sc_sco_l != NULL) {
DPRINTF("sc_sco_l=%p\n", sc->sc_sco_l);
- sco_detach(&sc->sc_sco_l);
+ sco_detach_pcb(&sc->sc_sco_l);
sc->sc_sco_l = NULL;
}
mutex_exit(bt_lock);
@@ -430,7 +430,7 @@ btsco_sco_connected(void *arg)
* If we are listening, no more need
*/
if (sc->sc_sco_l != NULL)
- sco_detach(&sc->sc_sco_l);
+ sco_detach_pcb(&sc->sc_sco_l);
sc->sc_state = BTSCO_OPEN;
cv_broadcast(&sc->sc_connect);
@@ -446,7 +446,7 @@ btsco_sco_disconnected(void *arg, int err)
KASSERT(sc->sc_sco != NULL);
sc->sc_err = err;
- sco_detach(&sc->sc_sco);
+ sco_detach_pcb(&sc->sc_sco);
switch (sc->sc_state) {
case BTSCO_CLOSED: /* dont think this can happen */
@@ -494,7 +494,7 @@ btsco_sco_newconn(void *arg, struct sockaddr_bt *laddr,
|| sc->sc_sco != NULL)
return NULL;
- sco_attach(&sc->sc_sco, &btsco_sco_proto, sc);
+ sco_attach_pcb(&sc->sc_sco, &btsco_sco_proto, sc);
return sc->sc_sco;
}
@@ -588,38 +588,38 @@ btsco_open(void *hdl, int flags)
bdaddr_copy(&sa.bt_bdaddr, &sc->sc_laddr);
if (sc->sc_flags & BTSCO_LISTEN) {
- err = sco_attach(&sc->sc_sco_l, &btsco_sco_proto, sc);
+ err = sco_attach_pcb(&sc->sc_sco_l, &btsco_sco_proto, sc);
if (err)
goto done;
err = sco_bind(sc->sc_sco_l, &sa);
if (err) {
- sco_detach(&sc->sc_sco_l);
+ sco_detach_pcb(&sc->sc_sco_l);
goto done;
}
err = sco_listen(sc->sc_sco_l);
if (err) {
- sco_detach(&sc->sc_sco_l);
+ sco_detach_pcb(&sc->sc_sco_l);
goto done;
}
timo = 0; /* no timeout */
} else {
- err = sco_attach(&sc->sc_sco, &btsco_sco_proto, sc);
+ err = sco_attach_pcb(&sc->sc_sco, &btsco_sco_proto, sc);
if (err)
goto done;
err = sco_bind(sc->sc_sco, &sa);
if (err) {
- sco_detach(&sc->sc_sco);
+ sco_detach_pcb(&sc->sc_sco);
goto done;
}
bdaddr_copy(&sa.bt_bdaddr, &sc->sc_raddr);
err = sco_connect(sc->sc_sco, &sa);
if (err) {
- sco_detach(&sc->sc_sco);
+ sco_detach_pcb(&sc->sc_sco);
goto done;
}
@@ -637,10 +637,10 @@ btsco_open(void *hdl, int flags)
/* fall through to */
case BTSCO_WAIT_CONNECT: /* error */
if (sc->sc_sco != NULL)
- sco_detach(&sc->sc_sco);
+ sco_detach_pcb(&sc->sc_sco);
if (sc->sc_sco_l != NULL)
- sco_detach(&sc->sc_sco_l);
+ sco_detach_pcb(&sc->sc_sco_l);
break;
@@ -673,11 +673,11 @@ btsco_close(void *hdl)
if (sc->sc_sco != NULL) {
sco_disconnect(sc->sc_sco, 0);
- sco_detach(&sc->sc_sco);
+ sco_detach_pcb(&sc->sc_sco);
}
if (sc->sc_sco_l != NULL) {
- sco_detach(&sc->sc_sco_l);
+ sco_detach_pcb(&sc->sc_sco_l);
}
if (sc->sc_rx_mbuf != NULL) {
diff --git a/sys/dev/bluetooth/btuart.c b/sys/dev/bluetooth/btuart.c
index ba6d052b28c..f08642fe1b0 100644
--- a/sys/dev/bluetooth/btuart.c
+++ b/sys/dev/bluetooth/btuart.c
@@ -1,4 +1,4 @@
-/* $NetBSD: btuart.c,v 1.26 2011/07/31 13:51:53 uebayasi Exp $ */
+/* $NetBSD: btuart.c,v 1.27 2014/05/20 18:25:54 rmind Exp $ */
/*-
* Copyright (c) 2006, 2007 KIYOHARA Takashi
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: btuart.c,v 1.26 2011/07/31 13:51:53 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: btuart.c,v 1.27 2014/05/20 18:25:54 rmind Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -188,7 +188,7 @@ btuart_attach(device_t parent __unused, device_t self, void *aux __unused)
MBUFQ_INIT(&sc->sc_scoq);
/* Attach Bluetooth unit */
- sc->sc_unit = hci_attach(&btuart_hci, self, 0);
+ sc->sc_unit = hci_attach_pcb(&btuart_hci, self, 0);
if (sc->sc_unit == NULL)
aprint_error_dev(self, "HCI attach failed\n");
}
@@ -205,7 +205,7 @@ btuart_detach(device_t self, int flags __unused)
btuart_disable(self);
if (sc->sc_unit) {
- hci_detach(sc->sc_unit);
+ hci_detach_pcb(sc->sc_unit);
sc->sc_unit = NULL;
}
diff --git a/sys/dev/pcmcia/bt3c.c b/sys/dev/pcmcia/bt3c.c
index e94790fb3d3..ebe1d2a632b 100644
--- a/sys/dev/pcmcia/bt3c.c
+++ b/sys/dev/pcmcia/bt3c.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bt3c.c,v 1.22 2012/01/14 21:38:00 plunky Exp $ */
+/* $NetBSD: bt3c.c,v 1.23 2014/05/20 18:25:54 rmind Exp $ */
/*-
* Copyright (c) 2005 Iain D. Hibbert,
@@ -69,7 +69,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bt3c.c,v 1.22 2012/01/14 21:38:00 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bt3c.c,v 1.23 2014/05/20 18:25:54 rmind Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -976,7 +976,7 @@ bt3c_attach(device_t parent, device_t self, void *aux)
}
/* Attach Bluetooth unit */
- sc->sc_unit = hci_attach(&bt3c_hci, self, BTF_POWER_UP_NOOP);
+ sc->sc_unit = hci_attach_pcb(&bt3c_hci, self, BTF_POWER_UP_NOOP);
if (sc->sc_unit == NULL)
aprint_error_dev(self, "HCI attach failed\n");
@@ -1003,7 +1003,7 @@ bt3c_detach(device_t self, int flags)
bt3c_disable(self);
if (sc->sc_unit) {
- hci_detach(sc->sc_unit);
+ hci_detach_pcb(sc->sc_unit);
sc->sc_unit = NULL;
}
@@ -1022,7 +1022,7 @@ bt3c_suspend(device_t self, const pmf_qual_t *qual)
struct bt3c_softc *sc = device_private(self);
if (sc->sc_unit) {
- hci_detach(sc->sc_unit);
+ hci_detach_pcb(sc->sc_unit);
sc->sc_unit = NULL;
}
@@ -1036,7 +1036,7 @@ bt3c_resume(device_t self, const pmf_qual_t *qual)
KASSERT(sc->sc_unit == NULL);
- sc->sc_unit = hci_attach(&bt3c_hci, self, BTF_POWER_UP_NOOP);
+ sc->sc_unit = hci_attach_pcb(&bt3c_hci, self, BTF_POWER_UP_NOOP);
if (sc->sc_unit == NULL)
return false;
diff --git a/sys/dev/pcmcia/btbc.c b/sys/dev/pcmcia/btbc.c
index 6e6fc3d5d14..00af57bfd35 100644
--- a/sys/dev/pcmcia/btbc.c
+++ b/sys/dev/pcmcia/btbc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: btbc.c,v 1.15 2010/02/24 22:38:08 dyoung Exp $ */
+/* $NetBSD: btbc.c,v 1.16 2014/05/20 18:25:54 rmind Exp $ */
/*
* Copyright (c) 2007 KIYOHARA Takashi
* All rights reserved.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: btbc.c,v 1.15 2010/02/24 22:38:08 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: btbc.c,v 1.16 2014/05/20 18:25:54 rmind Exp $");
#include <sys/param.h>
#include <sys/callout.h>
@@ -187,7 +187,7 @@ btbc_attach(device_t parent, device_t self, void *aux)
sc->sc_pcioh = cfe->iospace[0].handle;
/* Attach Bluetooth unit */
- sc->sc_unit = hci_attach(&btbc_hci, self, 0);
+ sc->sc_unit = hci_attach_pcb(&btbc_hci, self, 0);
if (sc->sc_unit == NULL)
aprint_error_dev(self, "HCI attach failed\n");
@@ -214,7 +214,7 @@ btbc_detach(device_t self, int flags)
callout_destroy(&sc->sc_ledch);
if (sc->sc_unit) {
- hci_detach(sc->sc_unit);
+ hci_detach_pcb(sc->sc_unit);
sc->sc_unit = NULL;
}
@@ -229,7 +229,7 @@ btbc_suspend(device_t self, const pmf_qual_t *qual)
struct btbc_softc *sc = device_private(self);
if (sc->sc_unit) {
- hci_detach(sc->sc_unit);
+ hci_detach_pcb(sc->sc_unit);
sc->sc_unit = NULL;
}
@@ -244,7 +244,7 @@ btbc_resume(device_t self, const pmf_qual_t *qual)
KASSERT(sc->sc_unit == NULL);
- sc->sc_unit = hci_attach(&btbc_hci, sc->sc_dev, 0);
+ sc->sc_unit = hci_attach_pcb(&btbc_hci, sc->sc_dev, 0);
if (sc->sc_unit == NULL)
return false;
diff --git a/sys/dev/sdmmc/sbt.c b/sys/dev/sdmmc/sbt.c
index fa1cd44b434..de5acf0eb67 100644
--- a/sys/dev/sdmmc/sbt.c
+++ b/sys/dev/sdmmc/sbt.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sbt.c,v 1.3 2012/10/27 17:18:38 chs Exp $ */
+/* $NetBSD: sbt.c,v 1.4 2014/05/20 18:25:54 rmind Exp $ */
/* $OpenBSD: sbt.c,v 1.9 2007/06/19 07:59:57 uwe Exp $ */
/*
@@ -20,7 +20,7 @@
/* Driver for Type-A/B SDIO Bluetooth cards */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sbt.c,v 1.3 2012/10/27 17:18:38 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbt.c,v 1.4 2014/05/20 18:25:54 rmind Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -202,7 +202,7 @@ sbt_attach(device_t parent, device_t self, void *aux)
/*
* Attach Bluetooth unit (machine-independent HCI).
*/
- sc->sc_unit = hci_attach(&sbt_hci, self, 0);
+ sc->sc_unit = hci_attach_pcb(&sbt_hci, self, 0);
}
static int
@@ -213,7 +213,7 @@ sbt_detach(device_t self, int flags)
sc->sc_dying = 1;
if (sc->sc_unit) {
- hci_detach(sc->sc_unit);
+ hci_detach_pcb(sc->sc_unit);
sc->sc_unit = NULL;
}
diff --git a/sys/dev/usb/ubt.c b/sys/dev/usb/ubt.c
index 04c8fe0c3de..28d99169ac6 100644
--- a/sys/dev/usb/ubt.c
+++ b/sys/dev/usb/ubt.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ubt.c,v 1.50 2014/02/25 18:30:10 pooka Exp $ */
+/* $NetBSD: ubt.c,v 1.51 2014/05/20 18:25:54 rmind Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ubt.c,v 1.50 2014/02/25 18:30:10 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ubt.c,v 1.51 2014/05/20 18:25:54 rmind Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -471,7 +471,7 @@ ubt_attach(device_t parent, device_t self, void *aux)
}
/* Attach HCI */
- sc->sc_unit = hci_attach(&ubt_hci, sc->sc_dev, 0);
+ sc->sc_unit = hci_attach_pcb(&ubt_hci, sc->sc_dev, 0);
usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
sc->sc_dev);
@@ -552,16 +552,16 @@ ubt_detach(device_t self, int flags)
/* Detach HCI interface */
if (sc->sc_unit) {
- hci_detach(sc->sc_unit);
+ hci_detach_pcb(sc->sc_unit);
sc->sc_unit = NULL;
}
/*
* Abort all pipes. Causes processes waiting for transfer to wake.
*
- * Actually, hci_detach() above will call ubt_disable() which may
- * call ubt_abortdealloc(), but lets be sure since doing it twice
- * wont cause an error.
+ * Actually, hci_detach_pcb() above will call ubt_disable() which
+ * may call ubt_abortdealloc(), but lets be sure since doing it
+ * twice wont cause an error.
*/
ubt_abortdealloc(sc);