svn commit: r218475 - in head/sys/dev/usb: . controller template
Hans Petter Selasky
hselasky at FreeBSD.org
Wed Feb 9 08:01:45 UTC 2011
Author: hselasky
Date: Wed Feb 9 08:01:45 2011
New Revision: 218475
URL: http://svn.freebsd.org/changeset/base/218475
Log:
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)
Modified:
head/sys/dev/usb/controller/usb_controller.c
head/sys/dev/usb/template/usb_template.c
head/sys/dev/usb/usb_transfer.c
Modified: head/sys/dev/usb/controller/usb_controller.c
==============================================================================
--- head/sys/dev/usb/controller/usb_controller.c Wed Feb 9 08:01:10 2011 (r218474)
+++ head/sys/dev/usb/controller/usb_controller.c Wed Feb 9 08:01:45 2011 (r218475)
@@ -460,19 +460,19 @@ usb_attach_sub(device_t dev, struct usb_
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 */
Modified: head/sys/dev/usb/template/usb_template.c
==============================================================================
--- head/sys/dev/usb/template/usb_template.c Wed Feb 9 08:01:10 2011 (r218474)
+++ head/sys/dev/usb/template/usb_template.c Wed Feb 9 08:01:45 2011 (r218475)
@@ -125,7 +125,7 @@ usb_make_raw_desc(struct usb_temp_setup
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 */
Modified: head/sys/dev/usb/usb_transfer.c
==============================================================================
--- head/sys/dev/usb/usb_transfer.c Wed Feb 9 08:01:10 2011 (r218474)
+++ head/sys/dev/usb/usb_transfer.c Wed Feb 9 08:01:45 2011 (r218475)
@@ -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);
More information about the svn-src-head
mailing list