ChangeSet 1.875, 2002/12/12 14:25:55-08:00, greg@kroah.com [PATCH] USB: Fix compile errors with usb-skeleton driver. diff -Nru a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c --- a/drivers/usb/usb-skeleton.c Fri Dec 13 17:18:48 2002 +++ b/drivers/usb/usb-skeleton.c Fri Dec 13 17:18:48 2002 @@ -238,9 +238,9 @@ int subminor; int retval = 0; - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); - subminor = MINOR (inode->i_rdev) - USB_SKEL_MINOR_BASE; + subminor = minor (inode->i_rdev) - USB_SKEL_MINOR_BASE; if ((subminor < 0) || (subminor >= MAX_DEVICES)) { return -ENODEV; @@ -291,11 +291,11 @@ dev = (struct usb_skel *)file->private_data; if (dev == NULL) { - dbg (__FUNCTION__ " - object is NULL"); + dbg ("%s - object is NULL", __FUNCTION__); return -ENODEV; } - dbg(__FUNCTION__ " - minor %d", dev->minor); + dbg("%s - minor %d", __FUNCTION__, dev->minor); /* lock our minor table */ down (&minor_table_mutex); @@ -304,7 +304,7 @@ down (&dev->sem); if (dev->open_count <= 0) { - dbg (__FUNCTION__ " - device not opened"); + dbg ("%s - device not opened", __FUNCTION__); retval = -ENODEV; goto exit_not_opened; } @@ -347,7 +347,7 @@ dev = (struct usb_skel *)file->private_data; - dbg(__FUNCTION__ " - minor %d, count = %d", dev->minor, count); + dbg("%s - minor %d, count = %d", __FUNCTION__, dev->minor, count); /* lock this object */ down (&dev->sem); @@ -390,7 +390,7 @@ dev = (struct usb_skel *)file->private_data; - dbg(__FUNCTION__ " - minor %d, count = %d", dev->minor, count); + dbg("%s - minor %d, count = %d", __FUNCTION__, dev->minor, count); /* lock this object */ down (&dev->sem); @@ -403,13 +403,13 @@ /* verify that we actually have some data to write */ if (count == 0) { - dbg(__FUNCTION__ " - write request of 0 bytes"); + dbg("%s - write request of 0 bytes", __FUNCTION__); goto exit; } /* see if we are already in the middle of a write */ if (dev->write_urb->status == -EINPROGRESS) { - dbg (__FUNCTION__ " - already writing"); + dbg ("%s - already writing", __FUNCTION__); goto exit; } @@ -438,8 +438,8 @@ unless a spinlock is held */ retval = usb_submit_urb(dev->write_urb, GFP_KERNEL); if (retval) { - err(__FUNCTION__ " - failed submitting write urb, error %d", - retval); + err("%s - failed submitting write urb, error %d", + __FUNCTION__, retval); } else { retval = bytes_written; } @@ -470,7 +470,7 @@ return -ENODEV; } - dbg(__FUNCTION__ " - minor %d, cmd 0x%.4x, arg %ld", + dbg("%s - minor %d, cmd 0x%.4x, arg %ld", __FUNCTION__, dev->minor, cmd, arg); @@ -491,12 +491,12 @@ { struct usb_skel *dev = (struct usb_skel *)urb->context; - dbg(__FUNCTION__ " - minor %d", dev->minor); + dbg("%s - minor %d", __FUNCTION__, dev->minor); if ((urb->status != -ENOENT) && (urb->status != -ECONNRESET)) { - dbg(__FUNCTION__ " - nonzero write bulk status received: %d", - urb->status); + dbg("%s - nonzero write bulk status received: %d", + __FUNCTION__, urb->status); return; } @@ -514,7 +514,7 @@ { struct usb_device *udev = interface_to_usbdev(interface); struct usb_skel *dev = NULL; - struct usb_interface_descriptor *iface_desc; + struct usb_host_interface *iface_desc; struct usb_endpoint_descriptor *endpoint; int minor; int buffer_size; @@ -554,7 +554,7 @@ /* set up the endpoint information */ /* check out the endpoints */ iface_desc = &interface->altsetting[0]; - for (i = 0; i < iface_desc->bNumEndpoints; ++i) { + for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) { endpoint = &iface_desc->endpoint[i].desc; if ((endpoint->bEndpointAddress & 0x80) &&