Minor cleanup:
- use device_printf() instead of printf() to give more accurate warnings. - use memcpy() instead of bcopy(). - add missing #if's for non-FreeBSD compilation. Approved by: thompsa (mentor)
This commit is contained in:
parent
493812ee6e
commit
8833442863
sys/dev/usb
@ -460,19 +460,19 @@ usb_attach_sub(device_t dev, struct usb_bus *bus)
|
||||
|
||||
if (usb_proc_create(&bus->giant_callback_proc,
|
||||
&bus->bus_mtx, pname, USB_PRI_MED)) {
|
||||
printf("WARNING: Creation of USB Giant "
|
||||
device_printf(dev, "WARNING: Creation of USB Giant "
|
||||
"callback process failed.\n");
|
||||
} else if (usb_proc_create(&bus->non_giant_callback_proc,
|
||||
&bus->bus_mtx, pname, USB_PRI_HIGH)) {
|
||||
printf("WARNING: Creation of USB non-Giant "
|
||||
device_printf(dev, "WARNING: Creation of USB non-Giant "
|
||||
"callback process failed.\n");
|
||||
} else if (usb_proc_create(&bus->explore_proc,
|
||||
&bus->bus_mtx, pname, USB_PRI_MED)) {
|
||||
printf("WARNING: Creation of USB explore "
|
||||
device_printf(dev, "WARNING: Creation of USB explore "
|
||||
"process failed.\n");
|
||||
} else if (usb_proc_create(&bus->control_xfer_proc,
|
||||
&bus->bus_mtx, pname, USB_PRI_MED)) {
|
||||
printf("WARNING: Creation of USB control transfer "
|
||||
device_printf(dev, "WARNING: Creation of USB control transfer "
|
||||
"process failed.\n");
|
||||
} else {
|
||||
/* Get final attach going */
|
||||
|
@ -125,7 +125,7 @@ usb_make_raw_desc(struct usb_temp_setup *temp,
|
||||
len = raw[0];
|
||||
if (temp->buf) {
|
||||
dst = USB_ADD_BYTES(temp->buf, temp->size);
|
||||
bcopy(raw, dst, len);
|
||||
memcpy(dst, raw, len);
|
||||
|
||||
/* check if we have got a CDC union descriptor */
|
||||
|
||||
|
@ -1148,7 +1148,9 @@ done:
|
||||
static void
|
||||
usbd_transfer_unsetup_sub(struct usb_xfer_root *info, uint8_t needs_delay)
|
||||
{
|
||||
#if USB_HAVE_BUSDMA
|
||||
struct usb_page_cache *pc;
|
||||
#endif
|
||||
|
||||
USB_BUS_LOCK_ASSERT(info->bus, MA_OWNED);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user