Expand USB_ATTACH_SETUP inline + devinfo tweaks

# looks like there's a chance that uaudio might compile on otherBSD, so leave
# those #defines alone as well as make this change in a compatible way.
This commit is contained in:
Warner Losh 2007-06-09 06:49:05 +00:00
parent a5b1cb0cd0
commit 8d58ce651f

View file

@ -523,13 +523,14 @@ USB_ATTACH(uaudio)
USB_ATTACH_START(uaudio, sc, uaa);
usb_interface_descriptor_t *id;
usb_config_descriptor_t *cdesc;
#if !define(__FreeBSD__)
char devinfo[1024];
#endif
usbd_status err;
int i, j, found;
#if defined(__FreeBSD__)
usbd_devinfo(uaa->device, 0, devinfo);
USB_ATTACH_SETUP;
sc->sc_dev = self;
#else
usbd_devinfo(uaa->device, 0, devinfo, sizeof(devinfo));
printf(": %s\n", devinfo);