Module Name:    src
Committed By:   riz
Date:           Sun Apr 22 03:13:21 UTC 2012

Modified Files:
        src/sys/dev/usb [netbsd-5]: uaudio.c

Log Message:
Pull up following revision(s) (requested by jakllsch in ticket #1751):
        sys/dev/usb/uaudio.c: revision 1.131
Use usbd_get_device_descriptor() instead of groping for it directly
in the usbd_device struct.


To generate a diff of this commit:
cvs rdiff -u -r1.114.6.1 -r1.114.6.2 src/sys/dev/usb/uaudio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/uaudio.c
diff -u src/sys/dev/usb/uaudio.c:1.114.6.1 src/sys/dev/usb/uaudio.c:1.114.6.2
--- src/sys/dev/usb/uaudio.c:1.114.6.1	Sat Apr 21 15:57:27 2012
+++ src/sys/dev/usb/uaudio.c	Sun Apr 22 03:13:21 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uaudio.c,v 1.114.6.1 2012/04/21 15:57:27 riz Exp $	*/
+/*	$NetBSD: uaudio.c,v 1.114.6.2 2012/04/22 03:13:21 riz Exp $	*/
 
 /*
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.114.6.1 2012/04/21 15:57:27 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.114.6.2 2012/04/22 03:13:21 riz Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -2606,6 +2606,7 @@ Static usbd_status
 uaudio_chan_open(struct uaudio_softc *sc, struct chan *ch)
 {
 	struct as_info *as;
+	usb_device_descriptor_t *ddesc;
 	int endpt;
 	usbd_status err;
 
@@ -2622,8 +2623,9 @@ uaudio_chan_open(struct uaudio_softc *sc
 	/*
 	 * Roland SD-90 freezes by a SAMPLING_FREQ_CONTROL request.
 	 */
-	if ((UGETW(sc->sc_udev->ddesc.idVendor) != USB_VENDOR_ROLAND) &&
-	    (UGETW(sc->sc_udev->ddesc.idProduct) != USB_PRODUCT_ROLAND_SD90)) {
+	ddesc = usbd_get_device_descriptor(sc->sc_udev);
+	if ((UGETW(ddesc->idVendor) != USB_VENDOR_ROLAND) &&
+	    (UGETW(ddesc->idProduct) != USB_PRODUCT_ROLAND_SD90)) {
 		err = uaudio_set_speed(sc, endpt, ch->sample_rate);
 		if (err) {
 			DPRINTF(("uaudio_chan_open: set_speed failed err=%s\n",

Reply via email to