Commit d92e1bbd authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] USB: rename usb_free_dev() to usb_put_dev()

This was done to make the next reference count patch easier,
and because almost everyone was already calling usb_put_dev() anyway...
parent 0ea00738
......@@ -876,7 +876,7 @@ static void usb_hub_port_connect_change(struct usb_hub *hubstate, int port,
/* Reset the device, and detect its speed */
if (usb_hub_port_reset(hub, port, dev, delay)) {
usb_free_dev(dev);
usb_put_dev(dev);
break;
}
......@@ -928,7 +928,7 @@ static void usb_hub_port_connect_change(struct usb_hub *hubstate, int port,
goto done;
/* Free the configuration if there was an error */
usb_free_dev(dev);
usb_put_dev(dev);
/* Switch to a long reset time */
delay = HUB_LONG_RESET_TIME;
......
......@@ -716,7 +716,7 @@ struct usb_device *usb_get_dev (struct usb_device *dev)
}
/**
* usb_free_dev - free a usb device structure when all users of it are finished.
* usb_put_dev - free a usb device structure when all users of it are finished.
* @dev: device that's been disconnected
* Context: !in_interrupt ()
*
......@@ -727,7 +727,7 @@ struct usb_device *usb_get_dev (struct usb_device *dev)
* gone, everything is cleaned up, so it's time to get rid of these last
* records of this device.
*/
void usb_free_dev(struct usb_device *dev)
void usb_put_dev(struct usb_device *dev)
{
if (atomic_dec_and_test(&dev->refcnt)) {
if (dev->bus->op->deallocate)
......@@ -738,7 +738,6 @@ void usb_free_dev(struct usb_device *dev)
}
}
/**
* usb_get_current_frame_number - return current bus frame number
* @dev: the device whose bus is being queried
......@@ -1454,7 +1453,7 @@ EXPORT_SYMBOL(usb_device_probe);
EXPORT_SYMBOL(usb_device_remove);
EXPORT_SYMBOL(usb_alloc_dev);
EXPORT_SYMBOL(usb_free_dev);
EXPORT_SYMBOL(usb_put_dev);
EXPORT_SYMBOL(usb_get_dev);
EXPORT_SYMBOL(usb_hub_tt_clear_buffer);
......
......@@ -476,7 +476,7 @@ static int ehci_start (struct usb_hcd *hcd)
ehci_ready (ehci);
ehci_reset (ehci);
bus->root_hub = 0;
usb_free_dev (udev);
usb_put_dev (udev);
retval = -ENODEV;
goto done2;
}
......
......@@ -566,7 +566,7 @@ static int rh_connect_rh (hci_t * hci)
hci->bus->root_hub = usb_dev;
usb_connect (usb_dev);
if (usb_new_device (usb_dev) != 0) {
usb_free_dev (usb_dev);
usb_put_dev (usb_dev);
return -ENODEV;
}
......
......@@ -515,7 +515,7 @@ static int hc_start (struct ohci_hcd *ohci)
usb_connect (udev);
udev->speed = USB_SPEED_FULL;
if (usb_register_root_hub (udev, ohci->hcd.controller) != 0) {
usb_free_dev (udev);
usb_put_dev (udev);
ohci->hcd.self.root_hub = NULL;
disable (ohci);
ohci->hc_control &= ~OHCI_CTRL_HCFS;
......
......@@ -2280,7 +2280,7 @@ static int __devinit uhci_start(struct usb_hcd *hcd)
uhci->term_td = NULL;
err_alloc_term_td:
usb_free_dev(udev);
usb_put_dev(udev);
hcd->self.root_hub = NULL;
err_alloc_root_hub:
......
......@@ -261,8 +261,7 @@ struct usb_device {
extern struct usb_device *usb_alloc_dev(struct usb_device *parent, struct usb_bus *);
extern struct usb_device *usb_get_dev(struct usb_device *dev);
extern void usb_free_dev(struct usb_device *);
#define usb_put_dev usb_free_dev
extern void usb_put_dev(struct usb_device *dev);
/* mostly for devices emulating SCSI over USB */
extern int usb_reset_device(struct usb_device *dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment