Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Lan Tianyu and committed by
Greg Kroah-Hartman
3b2ab2b8 67635d39

-30
-6
drivers/usb/core/port.c
··· 68 68 struct usb_port *port_dev = to_usb_port(dev); 69 69 70 70 dev_pm_qos_hide_flags(dev); 71 - usb_acpi_unregister_power_resources(dev); 72 71 kfree(port_dev); 73 72 } 74 73 ··· 186 187 pm_runtime_enable(&port_dev->dev); 187 188 188 189 device_enable_async_suspend(&port_dev->dev); 189 - 190 - retval = usb_acpi_register_power_resources(&port_dev->dev); 191 - if (retval && retval != -ENODEV) 192 - dev_warn(&port_dev->dev, "the port can't register its ACPI power resource.\n"); 193 - 194 190 return 0; 195 191 196 192 error_register:
-18
drivers/usb/core/usb-acpi.c
··· 216 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 219 int usb_acpi_register(void) 238 220 { 239 221 return register_acpi_bus_type(&usb_acpi_bus);
-6
drivers/usb/core/usb.h
··· 191 191 extern void usb_acpi_unregister(void); 192 192 extern acpi_handle usb_get_hub_port_acpi_handle(struct usb_device *hdev, 193 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 194 #else 197 195 static inline int usb_acpi_register(void) { return 0; }; 198 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 197 #endif