Revert "usb: Register usb port's acpi power resources"
authorLan Tianyu <tianyu.lan@intel.com>
Mon, 28 Jan 2013 16:59:06 +0000 (00:59 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Jan 2013 15:33:07 +0000 (07:33 -0800)
This reverts commit 88bb965ed711e8a5984e70208ebc901a6ff4141f.

The linux-next branch of linux-pm tree has replaced
acpi_power_resource_(un)register_device() with new routines.
Commit 88bb965 will cause conflict in the linux-next tree.
So revert it and this will not affect other functions. Will
send a new patch with new routines after 3.9 merge window.

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/port.c
drivers/usb/core/usb-acpi.c
drivers/usb/core/usb.h

index 5df143dbd759469f7404f9c14ad8fd3b3a92d8e2..797f9d51473298582d166858b30e5e464ee2b18c 100644 (file)
@@ -68,7 +68,6 @@ static void usb_port_device_release(struct device *dev)
        struct usb_port *port_dev = to_usb_port(dev);
 
        dev_pm_qos_hide_flags(dev);
-       usb_acpi_unregister_power_resources(dev);
        kfree(port_dev);
 }
 
@@ -187,11 +186,6 @@ int usb_hub_create_port_device(struct usb_hub *hub, int port1)
                pm_runtime_enable(&port_dev->dev);
 
        device_enable_async_suspend(&port_dev->dev);
-
-       retval = usb_acpi_register_power_resources(&port_dev->dev);
-       if (retval && retval != -ENODEV)
-               dev_warn(&port_dev->dev, "the port can't register its ACPI power resource.\n");
-
        return 0;
 
 error_register:
index 8d304b0b5abf483cf87652485a84b57baf838b25..cef4252bb31a3c4cfcc1ccd4ce6338bde51fd33d 100644 (file)
@@ -216,24 +216,6 @@ static struct acpi_bus_type usb_acpi_bus = {
        .find_device = usb_acpi_find_device,
 };
 
-int usb_acpi_register_power_resources(struct device *dev)
-{
-       acpi_handle port_handle = DEVICE_ACPI_HANDLE(dev);
-
-       if (!port_handle)
-               return -ENODEV;
-
-       return acpi_power_resource_register_device(dev, port_handle);
-}
-
-void usb_acpi_unregister_power_resources(struct device *dev)
-{
-       acpi_handle port_handle = DEVICE_ACPI_HANDLE(dev);
-
-       if (port_handle)
-               acpi_power_resource_unregister_device(dev, port_handle);
-}
-
 int usb_acpi_register(void)
 {
        return register_acpi_bus_type(&usb_acpi_bus);
index 601b044f90f0bc278f1eebe94207c9bc2d17bda5..a7f20bde0e5e2a18d202a346b1e4024af28fd796 100644 (file)
@@ -191,13 +191,7 @@ extern int usb_acpi_register(void);
 extern void usb_acpi_unregister(void);
 extern acpi_handle usb_get_hub_port_acpi_handle(struct usb_device *hdev,
        int port1);
-extern int usb_acpi_register_power_resources(struct device *dev);
-extern void usb_acpi_unregister_power_resources(struct device *dev);
 #else
 static inline int usb_acpi_register(void) { return 0; };
 static inline void usb_acpi_unregister(void) { };
-static inline int usb_acpi_register_power_resources(struct device *dev)
-       { return 0; };
-static inline void usb_acpi_unregister_power_resources(struct device *dev)
-       { };
 #endif