]> err.no Git - linux-2.6/blobdiff - drivers/usb/core/message.c
USB: replace remaining __FUNCTION__ occurrences
[linux-2.6] / drivers / usb / core / message.c
index a3695b5115ff563b97ee96d4f2aee167dfb394e5..e819e5359d5765e1d2e1540432a6aa4981fa5d0a 100644 (file)
@@ -312,7 +312,7 @@ static void sg_complete(struct urb *urb)
                                    retval != -EBUSY)
                                        dev_err(&io->dev->dev,
                                                "%s, unlink --> %d\n",
-                                               __FUNCTION__, retval);
+                                               __func__, retval);
                        } else if (urb == io->urbs [i])
                                found = 1;
                }
@@ -550,7 +550,7 @@ void usb_sg_wait(struct usb_sg_request *io)
                        io->urbs[i]->dev = NULL;
                        io->urbs[i]->status = retval;
                        dev_dbg(&io->dev->dev, "%s, submit --> %d\n",
-                               __FUNCTION__, retval);
+                               __func__, retval);
                        usb_sg_cancel(io);
                }
                spin_lock_irq(&io->lock);
@@ -600,7 +600,7 @@ void usb_sg_cancel(struct usb_sg_request *io)
                        retval = usb_unlink_urb(io->urbs [i]);
                        if (retval != -EINPROGRESS && retval != -EBUSY)
                                dev_warn(&io->dev->dev, "%s, unlink --> %d\n",
-                                       __FUNCTION__, retval);
+                                       __func__, retval);
                }
                spin_lock(&io->lock);
        }
@@ -1068,7 +1068,7 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0)
 {
        int i;
 
-       dev_dbg(&dev->dev, "%s nuking %s URBs\n", __FUNCTION__,
+       dev_dbg(&dev->dev, "%s nuking %s URBs\n", __func__,
                skip_ep0 ? "non-ep0" : "all");
        for (i = skip_ep0; i < 16; ++i) {
                usb_disable_endpoint(dev, i);
@@ -1089,8 +1089,8 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0)
                                continue;
                        dev_dbg(&dev->dev, "unregistering interface %s\n",
                                interface->dev.bus_id);
-                       usb_remove_sysfs_intf_files(interface);
                        device_del(&interface->dev);
+                       usb_remove_sysfs_intf_files(interface);
                }
 
                /* Now that the interfaces are unbound, nobody should
@@ -1231,7 +1231,7 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate)
         */
 
        /* prevent submissions using previous endpoint settings */
-       if (iface->cur_altsetting != alt && device_is_registered(&iface->dev))
+       if (iface->cur_altsetting != alt)
                usb_remove_sysfs_intf_files(iface);
        usb_disable_interface(dev, iface);
 
@@ -1330,8 +1330,7 @@ int usb_reset_configuration(struct usb_device *dev)
                struct usb_interface *intf = config->interface[i];
                struct usb_host_interface *alt;
 
-               if (device_is_registered(&intf->dev))
-                       usb_remove_sysfs_intf_files(intf);
+               usb_remove_sysfs_intf_files(intf);
                alt = usb_altnum_to_altsetting(intf, 0);
 
                /* No altsetting 0?  We'll assume the first altsetting.