summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2009-03-20 18:56:27 +0000
committerthompsa <thompsa@FreeBSD.org>2009-03-20 18:56:27 +0000
commit83e8c0befefb680ec6805a51636a3602d8b25212 (patch)
tree0c6b39d5d7298128c3f71f0c117835c996aa744e
parent4ed7cea882003c35dd1d4d0963de52108efd411b (diff)
downloadFreeBSD-src-83e8c0befefb680ec6805a51636a3602d8b25212.zip
FreeBSD-src-83e8c0befefb680ec6805a51636a3602d8b25212.tar.gz
MFp4 //depot/projects/usb @159375,159376,159377
Further remove dependancy towards Giant. Submitted by: Hans Petter Selasky
-rw-r--r--sys/dev/usb/input/uhid.c12
-rw-r--r--sys/dev/usb/input/ums.c5
-rw-r--r--sys/dev/usb/serial/ubser.c4
-rw-r--r--sys/dev/usb/serial/ucycom.c3
-rw-r--r--sys/dev/usb/serial/umodem.c2
-rw-r--r--sys/dev/usb/serial/uplcom.c4
-rw-r--r--sys/dev/usb/serial/uvisor.c12
-rw-r--r--sys/dev/usb/storage/umass.c6
8 files changed, 23 insertions, 25 deletions
diff --git a/sys/dev/usb/input/uhid.c b/sys/dev/usb/input/uhid.c
index 99e4b5d..b6fa631 100644
--- a/sys/dev/usb/input/uhid.c
+++ b/sys/dev/usb/input/uhid.c
@@ -668,8 +668,8 @@ uhid_attach(device_t dev)
* feature report ID 2 before it'll start
* returning digitizer data.
*/
- error = usb2_req_set_report
- (uaa->device, &Giant, reportbuf, sizeof(reportbuf),
+ error = usb2_req_set_report(uaa->device, NULL,
+ reportbuf, sizeof(reportbuf),
uaa->info.bIfaceIndex, UHID_FEATURE_REPORT, 2);
if (error) {
@@ -691,16 +691,16 @@ uhid_attach(device_t dev)
}
if (sc->sc_repdesc_ptr == NULL) {
- error = usb2_req_get_hid_desc
- (uaa->device, &Giant, &sc->sc_repdesc_ptr,
- &sc->sc_repdesc_size, M_USBDEV, uaa->info.bIfaceIndex);
+ error = usb2_req_get_hid_desc(uaa->device, NULL,
+ &sc->sc_repdesc_ptr, &sc->sc_repdesc_size,
+ M_USBDEV, uaa->info.bIfaceIndex);
if (error) {
device_printf(dev, "no report descriptor\n");
goto detach;
}
}
- error = usb2_req_set_idle(uaa->device, &Giant,
+ error = usb2_req_set_idle(uaa->device, NULL,
uaa->info.bIfaceIndex, 0, 0);
if (error) {
diff --git a/sys/dev/usb/input/ums.c b/sys/dev/usb/input/ums.c
index 5b884e8..9539e20 100644
--- a/sys/dev/usb/input/ums.c
+++ b/sys/dev/usb/input/ums.c
@@ -338,7 +338,7 @@ ums_probe(device_t dev)
(id->bInterfaceClass != UICLASS_HID))
return (ENXIO);
- error = usb2_req_get_hid_desc(uaa->device, &Giant,
+ error = usb2_req_get_hid_desc(uaa->device, NULL,
&d_ptr, &d_len, M_TEMP, uaa->info.bIfaceIndex);
if (error)
@@ -395,8 +395,7 @@ ums_attach(device_t dev)
DPRINTF("error=%s\n", usb2_errstr(err));
goto detach;
}
- err = usb2_req_get_hid_desc
- (uaa->device, &Giant, &d_ptr,
+ err = usb2_req_get_hid_desc(uaa->device, NULL, &d_ptr,
&d_len, M_TEMP, uaa->info.bIfaceIndex);
if (err) {
diff --git a/sys/dev/usb/serial/ubser.c b/sys/dev/usb/serial/ubser.c
index 3aaad78..266af1d 100644
--- a/sys/dev/usb/serial/ubser.c
+++ b/sys/dev/usb/serial/ubser.c
@@ -244,8 +244,8 @@ ubser_attach(device_t dev)
req.wIndex[0] = sc->sc_iface_no;
req.wIndex[1] = 0;
USETW(req.wLength, 1);
- error = usb2_do_request_flags
- (uaa->device, &Giant, &req, &sc->sc_numser,
+ error = usb2_do_request_flags(uaa->device, NULL,
+ &req, &sc->sc_numser,
0, NULL, USB_DEFAULT_TIMEOUT);
if (error || (sc->sc_numser == 0)) {
diff --git a/sys/dev/usb/serial/ucycom.c b/sys/dev/usb/serial/ucycom.c
index ff965ca..a7f5699 100644
--- a/sys/dev/usb/serial/ucycom.c
+++ b/sys/dev/usb/serial/ucycom.c
@@ -222,8 +222,7 @@ ucycom_attach(device_t dev)
/* get report descriptor */
- error = usb2_req_get_hid_desc
- (uaa->device, &Giant,
+ error = usb2_req_get_hid_desc(uaa->device, NULL,
&urd_ptr, &urd_len, M_USBDEV,
UCYCOM_IFACE_INDEX);
diff --git a/sys/dev/usb/serial/umodem.c b/sys/dev/usb/serial/umodem.c
index 9960635..9c53c88 100644
--- a/sys/dev/usb/serial/umodem.c
+++ b/sys/dev/usb/serial/umodem.c
@@ -769,7 +769,7 @@ umodem_set_comm_feature(struct usb2_device *udev, uint8_t iface_no,
USETW(req.wLength, UCDC_ABSTRACT_STATE_LENGTH);
USETW(ast.wState, state);
- return (usb2_do_request(udev, &Giant, &req, &ast));
+ return (usb2_do_request(udev, NULL, &req, &ast));
}
static int
diff --git a/sys/dev/usb/serial/uplcom.c b/sys/dev/usb/serial/uplcom.c
index 44e676b..a915160 100644
--- a/sys/dev/usb/serial/uplcom.c
+++ b/sys/dev/usb/serial/uplcom.c
@@ -441,7 +441,7 @@ uplcom_reset(struct uplcom_softc *sc, struct usb2_device *udev)
req.wIndex[1] = 0;
USETW(req.wLength, 0);
- return (usb2_do_request(udev, &Giant, &req, NULL));
+ return (usb2_do_request(udev, NULL, &req, NULL));
}
struct pl2303x_init {
@@ -485,7 +485,7 @@ uplcom_pl2303x_init(struct usb2_device *udev)
USETW(req.wIndex, pl2303x[i].index);
USETW(req.wLength, pl2303x[i].length);
- err = usb2_do_request(udev, &Giant, &req, buf);
+ err = usb2_do_request(udev, NULL, &req, buf);
if (err) {
DPRINTF("error=%s\n", usb2_errstr(err));
return (EIO);
diff --git a/sys/dev/usb/serial/uvisor.c b/sys/dev/usb/serial/uvisor.c
index 0fb0658..bff317b 100644
--- a/sys/dev/usb/serial/uvisor.c
+++ b/sys/dev/usb/serial/uvisor.c
@@ -373,8 +373,8 @@ uvisor_init(struct uvisor_softc *sc, struct usb2_device *udev, struct usb2_confi
USETW(req.wValue, 0);
USETW(req.wIndex, 0);
USETW(req.wLength, UVISOR_CONNECTION_INFO_SIZE);
- err = usb2_do_request_flags
- (udev, &Giant, &req, &coninfo, USB_SHORT_XFER_OK,
+ err = usb2_do_request_flags(udev, NULL,
+ &req, &coninfo, USB_SHORT_XFER_OK,
&actlen, USB_DEFAULT_TIMEOUT);
if (err) {
@@ -427,7 +427,7 @@ uvisor_init(struct uvisor_softc *sc, struct usb2_device *udev, struct usb2_confi
USETW(req.wLength, UVISOR_GET_PALM_INFORMATION_LEN);
err = usb2_do_request_flags
- (udev, &Giant, &req, &pconinfo, USB_SHORT_XFER_OK,
+ (udev, NULL, &req, &pconinfo, USB_SHORT_XFER_OK,
&actlen, USB_DEFAULT_TIMEOUT);
if (err) {
@@ -468,7 +468,7 @@ uvisor_init(struct uvisor_softc *sc, struct usb2_device *udev, struct usb2_confi
USETW(req.wIndex, 0);
USETW(req.wLength, 1);
- err = usb2_do_request(udev, &Giant, &req, buffer);
+ err = usb2_do_request(udev, NULL, &req, buffer);
if (err) {
goto done;
}
@@ -479,7 +479,7 @@ uvisor_init(struct uvisor_softc *sc, struct usb2_device *udev, struct usb2_confi
USETW(req.wValue, 0);
USETW(req.wIndex, 0);
USETW(req.wLength, 1);
- err = usb2_do_request(udev, &Giant, &req, buffer);
+ err = usb2_do_request(udev, NULL, &req, buffer);
if (err) {
goto done;
}
@@ -490,7 +490,7 @@ uvisor_init(struct uvisor_softc *sc, struct usb2_device *udev, struct usb2_confi
USETW(req.wValue, 0);
USETW(req.wIndex, 5);
USETW(req.wLength, sizeof(wAvail));
- err = usb2_do_request(udev, &Giant, &req, &wAvail);
+ err = usb2_do_request(udev, NULL, &req, &wAvail);
if (err) {
goto done;
}
diff --git a/sys/dev/usb/storage/umass.c b/sys/dev/usb/storage/umass.c
index a3fc198..c4d8ae1 100644
--- a/sys/dev/usb/storage/umass.c
+++ b/sys/dev/usb/storage/umass.c
@@ -1583,7 +1583,7 @@ umass_attach(device_t dev)
* some devices need a delay after that the configuration value is
* set to function properly:
*/
- usb2_pause_mtx(&Giant, hz);
+ usb2_pause_mtx(NULL, hz);
/* register the SIM */
err = umass_cam_attach_sim(sc);
@@ -1642,7 +1642,7 @@ umass_init_shuttle(struct umass_softc *sc)
req.wIndex[0] = sc->sc_iface_no;
req.wIndex[1] = 0;
USETW(req.wLength, sizeof(status));
- err = usb2_do_request(sc->sc_udev, &Giant, &req, &status);
+ err = usb2_do_request(sc->sc_udev, NULL, &req, &status);
DPRINTF(sc, UDMASS_GEN, "Shuttle init returned 0x%02x%02x\n",
status[0], status[1]);
@@ -2161,7 +2161,7 @@ umass_bbb_get_max_lun(struct umass_softc *sc)
req.wIndex[1] = 0;
USETW(req.wLength, 1);
- err = usb2_do_request(sc->sc_udev, &Giant, &req, &buf);
+ err = usb2_do_request(sc->sc_udev, NULL, &req, &buf);
if (err) {
buf = 0;
OpenPOWER on IntegriCloud