diff options
| author | Lan Tianyu <tianyu.lan@intel.com> | 2013-01-28 11:59:06 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-29 10:33:07 -0500 |
| commit | 3b2ab2b84c68fb92accbc735927bc8221e4de973 (patch) | |
| tree | b92ed97ffde1665a6a20c0d1314dd8c981abb216 /drivers/usb/core | |
| parent | 67635d397a643514fdfa859f611b86bd3ad8958d (diff) | |
Revert "usb: Register usb port's acpi power resources"
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>
Diffstat (limited to 'drivers/usb/core')
| -rw-r--r-- | drivers/usb/core/port.c | 6 | ||||
| -rw-r--r-- | drivers/usb/core/usb-acpi.c | 18 | ||||
| -rw-r--r-- | drivers/usb/core/usb.h | 6 |
3 files changed, 0 insertions, 30 deletions
diff --git a/drivers/usb/core/port.c b/drivers/usb/core/port.c index 5df143dbd759..797f9d514732 100644 --- a/drivers/usb/core/port.c +++ b/drivers/usb/core/port.c | |||
| @@ -68,7 +68,6 @@ static void usb_port_device_release(struct device *dev) | |||
| 68 | struct usb_port *port_dev = to_usb_port(dev); | 68 | struct usb_port *port_dev = to_usb_port(dev); |
| 69 | 69 | ||
| 70 | dev_pm_qos_hide_flags(dev); | 70 | dev_pm_qos_hide_flags(dev); |
| 71 | usb_acpi_unregister_power_resources(dev); | ||
| 72 | kfree(port_dev); | 71 | kfree(port_dev); |
| 73 | } | 72 | } |
| 74 | 73 | ||
| @@ -187,11 +186,6 @@ int usb_hub_create_port_device(struct usb_hub *hub, int port1) | |||
| 187 | pm_runtime_enable(&port_dev->dev); | 186 | pm_runtime_enable(&port_dev->dev); |
| 188 | 187 | ||
| 189 | device_enable_async_suspend(&port_dev->dev); | 188 | device_enable_async_suspend(&port_dev->dev); |
| 190 | |||
| 191 | retval = usb_acpi_register_power_resources(&port_dev->dev); | ||
| 192 | if (retval && retval != -ENODEV) | ||
| 193 | dev_warn(&port_dev->dev, "the port can't register its ACPI power resource.\n"); | ||
| 194 | |||
| 195 | return 0; | 189 | return 0; |
| 196 | 190 | ||
| 197 | error_register: | 191 | error_register: |
diff --git a/drivers/usb/core/usb-acpi.c b/drivers/usb/core/usb-acpi.c index 8d304b0b5abf..cef4252bb31a 100644 --- a/drivers/usb/core/usb-acpi.c +++ b/drivers/usb/core/usb-acpi.c | |||
| @@ -216,24 +216,6 @@ static struct acpi_bus_type usb_acpi_bus = { | |||
| 216 | .find_device = usb_acpi_find_device, | 216 | .find_device = usb_acpi_find_device, |
| 217 | }; | 217 | }; |
| 218 | 218 | ||
| 219 | int usb_acpi_register_power_resources(struct device *dev) | ||
| 220 | { | ||
| 221 | acpi_handle port_handle = DEVICE_ACPI_HANDLE(dev); | ||
| 222 | |||
| 223 | if (!port_handle) | ||
| 224 | return -ENODEV; | ||
| 225 | |||
| 226 | return acpi_power_resource_register_device(dev, port_handle); | ||
| 227 | } | ||
| 228 | |||
| 229 | void usb_acpi_unregister_power_resources(struct device *dev) | ||
| 230 | { | ||
| 231 | acpi_handle port_handle = DEVICE_ACPI_HANDLE(dev); | ||
| 232 | |||
| 233 | if (port_handle) | ||
| 234 | acpi_power_resource_unregister_device(dev, port_handle); | ||
| 235 | } | ||
| 236 | |||
| 237 | int usb_acpi_register(void) | 219 | int usb_acpi_register(void) |
| 238 | { | 220 | { |
| 239 | return register_acpi_bus_type(&usb_acpi_bus); | 221 | return register_acpi_bus_type(&usb_acpi_bus); |
diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h index 601b044f90f0..a7f20bde0e5e 100644 --- a/drivers/usb/core/usb.h +++ b/drivers/usb/core/usb.h | |||
| @@ -191,13 +191,7 @@ extern int usb_acpi_register(void); | |||
| 191 | extern void usb_acpi_unregister(void); | 191 | extern void usb_acpi_unregister(void); |
| 192 | extern acpi_handle usb_get_hub_port_acpi_handle(struct usb_device *hdev, | 192 | extern acpi_handle usb_get_hub_port_acpi_handle(struct usb_device *hdev, |
| 193 | int port1); | 193 | int port1); |
| 194 | extern int usb_acpi_register_power_resources(struct device *dev); | ||
| 195 | extern void usb_acpi_unregister_power_resources(struct device *dev); | ||
| 196 | #else | 194 | #else |
| 197 | static inline int usb_acpi_register(void) { return 0; }; | 195 | static inline int usb_acpi_register(void) { return 0; }; |
| 198 | static inline void usb_acpi_unregister(void) { }; | 196 | static inline void usb_acpi_unregister(void) { }; |
| 199 | static inline int usb_acpi_register_power_resources(struct device *dev) | ||
| 200 | { return 0; }; | ||
| 201 | static inline void usb_acpi_unregister_power_resources(struct device *dev) | ||
| 202 | { }; | ||
| 203 | #endif | 197 | #endif |
