]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/usb/core/generic.c
Pull thermal into release branch
[mv-sheeva.git] / drivers / usb / core / generic.c
index 7b9e1ec718d2638209be0b6667e7f9b1ed9452c1..c1cb94e9f242a7fe2806e179b05122577b03b62f 100644 (file)
@@ -40,7 +40,7 @@ static int is_activesync(struct usb_interface_descriptor *desc)
                && desc->bInterfaceProtocol == 1;
 }
 
-int choose_configuration(struct usb_device *udev)
+int usb_choose_configuration(struct usb_device *udev)
 {
        int i;
        int num_configs;
@@ -164,7 +164,7 @@ static int generic_probe(struct usb_device *udev)
        if (udev->authorized == 0)
                dev_err(&udev->dev, "Device is not authorized for usage\n");
        else {
-               c = choose_configuration(udev);
+               c = usb_choose_configuration(udev);
                if (c >= 0) {
                        err = usb_set_configuration(udev, c);
                        if (err) {
@@ -206,8 +206,13 @@ static int generic_suspend(struct usb_device *udev, pm_message_t msg)
         */
        if (!udev->parent)
                rc = hcd_bus_suspend(udev);
+
+       /* Non-root devices don't need to do anything for FREEZE or PRETHAW */
+       else if (msg.event == PM_EVENT_FREEZE || msg.event == PM_EVENT_PRETHAW)
+               rc = 0;
        else
                rc = usb_port_suspend(udev);
+
        return rc;
 }