aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
authorKristen Accardi <kristen.c.accardi@intel.com>2006-06-28 03:07:16 -0400
committerLen Brown <len.brown@intel.com>2006-06-28 03:07:16 -0400
commita5e1b94008f2a96abf4a0c0371a55a56b320c13e (patch)
tree3e3a254fdbc565c4f85a66cc6dfaa60319e919a9 /drivers/acpi/scan.c
parenta6a888b3c20cf559c8a2e6e4d86c570dda2ef0f5 (diff)
ACPI: dock driver
Create a driver which lives in the acpi subsystem to handle dock events. This driver is not an "ACPI" driver, because acpi drivers require that the object be present when the driver is loaded. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Cc: Dave Hansen <haveblue@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r--drivers/acpi/scan.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index a7b1fda572cf..401e723e6c66 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -663,6 +663,29 @@ static int acpi_bus_find_driver(struct acpi_device *device)
663 Device Enumeration 663 Device Enumeration
664 -------------------------------------------------------------------------- */ 664 -------------------------------------------------------------------------- */
665 665
666acpi_status
667acpi_bus_get_ejd(acpi_handle handle, acpi_handle *ejd)
668{
669 acpi_status status;
670 acpi_handle tmp;
671 struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
672 union acpi_object *obj;
673
674 status = acpi_get_handle(handle, "_EJD", &tmp);
675 if (ACPI_FAILURE(status))
676 return status;
677
678 status = acpi_evaluate_object(handle, "_EJD", NULL, &buffer);
679 if (ACPI_SUCCESS(status)) {
680 obj = buffer.pointer;
681 status = acpi_get_handle(NULL, obj->string.pointer, ejd);
682 kfree(buffer.pointer);
683 }
684 return status;
685}
686EXPORT_SYMBOL_GPL(acpi_bus_get_ejd);
687
688
666static int acpi_bus_get_flags(struct acpi_device *device) 689static int acpi_bus_get_flags(struct acpi_device *device)
667{ 690{
668 acpi_status status = AE_OK; 691 acpi_status status = AE_OK;