aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-22 18:50:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-22 18:50:46 -0400
commita481991467d38afb43c3921d5b5b59ccb61b04ba (patch)
treea4b0b9a14da6fd5ef7b9b512bb32dbfcfcf2cd71 /drivers/acpi
parentf6a26ae7699416d86bea8cb68ce413571e9cab3c (diff)
parentcda4db53e9c28061c100400e1a4d273ea61dfba9 (diff)
Merge tag 'usb-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB 3.5-rc1 changes from Greg Kroah-Hartman: "Here is the big USB 3.5-rc1 pull request for the 3.5-rc1 merge window. It's touches a lot of different parts of the kernel, all USB drivers, due to some API cleanups (getting rid of the ancient err() macro) and some changes that are needed for USB 3.0 power management updates. There are also lots of new drivers, pimarily gadget, but others as well. We deleted a staging driver, which was nice, and finally dropped the obsolete usbfs code, which will make Al happy to never have to touch that again. There were some build errors in the tree that linux-next found a few days ago, but those were fixed by the most recent changes (all were due to us not building with CONFIG_PM disabled.) Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" * tag 'usb-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (477 commits) xhci: Fix DIV_ROUND_UP compile error. xhci: Fix compile with CONFIG_USB_SUSPEND=n USB: Fix core compile with CONFIG_USB_SUSPEND=n brcm80211: Fix compile error for .disable_hub_initiated_lpm. Revert "USB: EHCI: work around bug in the Philips ISP1562 controller" MAINTAINERS: Add myself as maintainer to the USB PHY Layer USB: EHCI: fix command register configuration lost problem USB: Remove races in devio.c USB: ehci-platform: remove update_device USB: Disable hub-initiated LPM for comms devices. xhci: Add Intel U1/U2 timeout policy. xhci: Add infrastructure for host-specific LPM policies. USB: Add macros for interrupt endpoint types. xhci: Reserve one command for USB3 LPM disable. xhci: Some Evaluate Context commands must succeed. USB: Disable USB 3.0 LPM in critical sections. USB: Add support to enable/disable USB3 link states. USB: Allow drivers to disable hub-initiated LPM. USB: Calculate USB 3.0 exit latencies for LPM. USB: Refactor code to set LPM support flag. ... Conflicts: arch/arm/mach-exynos/mach-nuri.c arch/arm/mach-exynos/mach-universal_c210.c drivers/net/wireless/ath/ath6kl/usb.c
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/glue.c2
-rw-r--r--drivers/acpi/utils.c30
2 files changed, 32 insertions, 0 deletions
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index 29a4a5c8ee00..1564e0927c21 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -69,6 +69,7 @@ static struct acpi_bus_type *acpi_get_bus_type(struct bus_type *type)
69 up_read(&bus_type_sem); 69 up_read(&bus_type_sem);
70 return ret; 70 return ret;
71} 71}
72EXPORT_SYMBOL_GPL(register_acpi_bus_type);
72 73
73static int acpi_find_bridge_device(struct device *dev, acpi_handle * handle) 74static int acpi_find_bridge_device(struct device *dev, acpi_handle * handle)
74{ 75{
@@ -85,6 +86,7 @@ static int acpi_find_bridge_device(struct device *dev, acpi_handle * handle)
85 up_read(&bus_type_sem); 86 up_read(&bus_type_sem);
86 return ret; 87 return ret;
87} 88}
89EXPORT_SYMBOL_GPL(unregister_acpi_bus_type);
88 90
89/* Get device's handler per its address under its parent */ 91/* Get device's handler per its address under its parent */
90struct acpi_find_child { 92struct acpi_find_child {
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index b002a471c5d4..adbbc1c80a26 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -382,3 +382,33 @@ acpi_evaluate_reference(acpi_handle handle,
382} 382}
383 383
384EXPORT_SYMBOL(acpi_evaluate_reference); 384EXPORT_SYMBOL(acpi_evaluate_reference);
385
386acpi_status
387acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld *pld)
388{
389 acpi_status status;
390 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
391 union acpi_object *output;
392
393 status = acpi_evaluate_object(handle, "_PLD", NULL, &buffer);
394
395 if (ACPI_FAILURE(status))
396 return status;
397
398 output = buffer.pointer;
399
400 if (!output || output->type != ACPI_TYPE_PACKAGE
401 || !output->package.count
402 || output->package.elements[0].type != ACPI_TYPE_BUFFER
403 || output->package.elements[0].buffer.length > sizeof(*pld)) {
404 status = AE_TYPE;
405 goto out;
406 }
407
408 memcpy(pld, output->package.elements[0].buffer.pointer,
409 output->package.elements[0].buffer.length);
410out:
411 kfree(buffer.pointer);
412 return status;
413}
414EXPORT_SYMBOL(acpi_get_physical_device_location);