Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys netbt: rename some attach/detach functions to have _pcb ...
details: https://anonhg.NetBSD.org/src/rev/da2eaab55aa4
branches: trunk
changeset: 329351:da2eaab55aa4
user: rmind <rmind%NetBSD.org@localhost>
date: Tue May 20 18:25:54 2014 +0000
description:
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:
sys/dev/bluetooth/bcsp.c | 8 ++++----
sys/dev/bluetooth/bthidev.c | 34 +++++++++++++++++-----------------
sys/dev/bluetooth/btmagic.c | 30 +++++++++++++++---------------
sys/dev/bluetooth/btsco.c | 34 +++++++++++++++++-----------------
sys/dev/bluetooth/btuart.c | 8 ++++----
sys/dev/pcmcia/bt3c.c | 12 ++++++------
sys/dev/pcmcia/btbc.c | 12 ++++++------
sys/dev/sdmmc/sbt.c | 8 ++++----
sys/dev/usb/ubt.c | 14 +++++++-------
sys/netbt/hci.h | 8 ++++----
sys/netbt/hci_link.c | 6 +++---
sys/netbt/hci_socket.c | 16 +++++++++-------
sys/netbt/hci_unit.c | 8 ++++----
sys/netbt/l2cap.h | 8 ++++----
sys/netbt/l2cap_socket.c | 20 +++++++++++---------
sys/netbt/l2cap_upper.c | 12 ++++++------
sys/netbt/rfcomm.h | 8 ++++----
sys/netbt/rfcomm_session.c | 8 ++++----
sys/netbt/rfcomm_socket.c | 22 ++++++++++++----------
sys/netbt/rfcomm_upper.c | 12 ++++++------
sys/netbt/sco.h | 6 +++---
sys/netbt/sco_socket.c | 20 +++++++++++---------
sys/netbt/sco_upper.c | 12 ++++++------
23 files changed, 167 insertions(+), 159 deletions(-)
diffs (truncated from 1321 to 300 lines):
diff -r 8bba9bdc8568 -r da2eaab55aa4 sys/dev/bluetooth/bcsp.c
--- a/sys/dev/bluetooth/bcsp.c Tue May 20 17:31:18 2014 +0000
+++ b/sys/dev/bluetooth/bcsp.c Tue May 20 18:25:54 2014 +0000
@@ -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 @@
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 @@
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 -r 8bba9bdc8568 -r da2eaab55aa4 sys/dev/bluetooth/bthidev.c
--- a/sys/dev/bluetooth/bthidev.c Tue May 20 17:31:18 2014 +0000
+++ b/sys/dev/bluetooth/bthidev.c Tue May 20 18:25:54 2014 +0000
@@ -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 @@
/* 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 @@
/*
* 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 @@
/*
* 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 @@
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 @@
/* 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 -r 8bba9bdc8568 -r da2eaab55aa4 sys/dev/bluetooth/btmagic.c
--- a/sys/dev/bluetooth/btmagic.c Tue May 20 17:31:18 2014 +0000
+++ b/sys/dev/bluetooth/btmagic.c Tue May 20 18:25:54 2014 +0000
@@ -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 @@
/* 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 @@
/*
* 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 @@
/*
* 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
return NULL;
}
Home |
Main Index |
Thread Index |
Old Index