Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Use usbd_get_device_descriptor() instead of grop...
details: https://anonhg.NetBSD.org/src/rev/df1e0ee1f825
branches: trunk
changeset: 778942:df1e0ee1f825
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Sun Apr 22 01:31:48 2012 +0000
description:
Use usbd_get_device_descriptor() instead of groping for it directly
in the usbd_device struct.
diffstat:
sys/dev/usb/uaudio.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r 4c55c7ee3c08 -r df1e0ee1f825 sys/dev/usb/uaudio.c
--- a/sys/dev/usb/uaudio.c Sat Apr 21 22:38:25 2012 +0000
+++ b/sys/dev/usb/uaudio.c Sun Apr 22 01:31:48 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uaudio.c,v 1.130 2012/03/15 18:40:32 bouyer Exp $ */
+/* $NetBSD: uaudio.c,v 1.131 2012/04/22 01:31:48 jakllsch Exp $ */
/*
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.130 2012/03/15 18:40:32 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.131 2012/04/22 01:31:48 jakllsch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -2685,6 +2685,7 @@
uaudio_chan_open(struct uaudio_softc *sc, struct chan *ch)
{
struct as_info *as;
+ usb_device_descriptor_t *ddesc;
int endpt;
usbd_status err;
@@ -2701,8 +2702,9 @@
/*
* 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("set_speed failed err=%s\n", usbd_errstr(err));
Home |
Main Index |
Thread Index |
Old Index