mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 11:16:11 +00:00
USB: rename usb_configure_device
This patch (as1314) renames usb_configure_device() and usb_configure_device_otg() in the hub driver. Neither name is appropriate because these routines enumerate devices, they don't configure them. That's handled by usb_choose_configuration() and usb_set_configuration(). Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
baf67741bf
commit
8d8558d108
1 changed files with 13 additions and 13 deletions
|
@ -1658,12 +1658,12 @@ static inline void announce_device(struct usb_device *udev) { }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* usb_configure_device_otg - FIXME (usbcore-internal)
|
* usb_enumerate_device_otg - FIXME (usbcore-internal)
|
||||||
* @udev: newly addressed device (in ADDRESS state)
|
* @udev: newly addressed device (in ADDRESS state)
|
||||||
*
|
*
|
||||||
* Do configuration for On-The-Go devices
|
* Finish enumeration for On-The-Go devices
|
||||||
*/
|
*/
|
||||||
static int usb_configure_device_otg(struct usb_device *udev)
|
static int usb_enumerate_device_otg(struct usb_device *udev)
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
|
@ -1734,7 +1734,7 @@ fail:
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* usb_configure_device - Detect and probe device intfs/otg (usbcore-internal)
|
* usb_enumerate_device - Read device configs/intfs/otg (usbcore-internal)
|
||||||
* @udev: newly addressed device (in ADDRESS state)
|
* @udev: newly addressed device (in ADDRESS state)
|
||||||
*
|
*
|
||||||
* This is only called by usb_new_device() and usb_authorize_device()
|
* This is only called by usb_new_device() and usb_authorize_device()
|
||||||
|
@ -1745,7 +1745,7 @@ fail:
|
||||||
* the string descriptors, as they will be errored out by the device
|
* the string descriptors, as they will be errored out by the device
|
||||||
* until it has been authorized.
|
* until it has been authorized.
|
||||||
*/
|
*/
|
||||||
static int usb_configure_device(struct usb_device *udev)
|
static int usb_enumerate_device(struct usb_device *udev)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
@ -1769,7 +1769,7 @@ static int usb_configure_device(struct usb_device *udev)
|
||||||
udev->descriptor.iManufacturer);
|
udev->descriptor.iManufacturer);
|
||||||
udev->serial = usb_cache_string(udev, udev->descriptor.iSerialNumber);
|
udev->serial = usb_cache_string(udev, udev->descriptor.iSerialNumber);
|
||||||
}
|
}
|
||||||
err = usb_configure_device_otg(udev);
|
err = usb_enumerate_device_otg(udev);
|
||||||
fail:
|
fail:
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
@ -1779,8 +1779,8 @@ fail:
|
||||||
* usb_new_device - perform initial device setup (usbcore-internal)
|
* usb_new_device - perform initial device setup (usbcore-internal)
|
||||||
* @udev: newly addressed device (in ADDRESS state)
|
* @udev: newly addressed device (in ADDRESS state)
|
||||||
*
|
*
|
||||||
* This is called with devices which have been enumerated, but not yet
|
* This is called with devices which have been detected but not fully
|
||||||
* configured. The device descriptor is available, but not descriptors
|
* enumerated. The device descriptor is available, but not descriptors
|
||||||
* for any device configuration. The caller must have locked either
|
* for any device configuration. The caller must have locked either
|
||||||
* the parent hub (if udev is a normal device) or else the
|
* the parent hub (if udev is a normal device) or else the
|
||||||
* usb_bus_list_lock (if udev is a root hub). The parent's pointer to
|
* usb_bus_list_lock (if udev is a root hub). The parent's pointer to
|
||||||
|
@ -1803,8 +1803,8 @@ int usb_new_device(struct usb_device *udev)
|
||||||
if (udev->parent)
|
if (udev->parent)
|
||||||
usb_autoresume_device(udev->parent);
|
usb_autoresume_device(udev->parent);
|
||||||
|
|
||||||
usb_detect_quirks(udev); /* Determine quirks */
|
usb_detect_quirks(udev);
|
||||||
err = usb_configure_device(udev); /* detect & probe dev/intfs */
|
err = usb_enumerate_device(udev); /* Read descriptors */
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
dev_dbg(&udev->dev, "udev %d, busnum %d, minor = %d\n",
|
dev_dbg(&udev->dev, "udev %d, busnum %d, minor = %d\n",
|
||||||
|
@ -1895,9 +1895,9 @@ int usb_authorize_device(struct usb_device *usb_dev)
|
||||||
goto error_device_descriptor;
|
goto error_device_descriptor;
|
||||||
}
|
}
|
||||||
usb_dev->authorized = 1;
|
usb_dev->authorized = 1;
|
||||||
result = usb_configure_device(usb_dev);
|
result = usb_enumerate_device(usb_dev);
|
||||||
if (result < 0)
|
if (result < 0)
|
||||||
goto error_configure;
|
goto error_enumerate;
|
||||||
/* Choose and set the configuration. This registers the interfaces
|
/* Choose and set the configuration. This registers the interfaces
|
||||||
* with the driver core and lets interface drivers bind to them.
|
* with the driver core and lets interface drivers bind to them.
|
||||||
*/
|
*/
|
||||||
|
@ -1912,7 +1912,7 @@ int usb_authorize_device(struct usb_device *usb_dev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dev_info(&usb_dev->dev, "authorized to connect\n");
|
dev_info(&usb_dev->dev, "authorized to connect\n");
|
||||||
error_configure:
|
error_enumerate:
|
||||||
error_device_descriptor:
|
error_device_descriptor:
|
||||||
error_autoresume:
|
error_autoresume:
|
||||||
out_authorized:
|
out_authorized:
|
||||||
|
|
Loading…
Reference in a new issue