All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] ACPI: Fix up _PLD methods
@ 2012-03-12 23:58 Matthew Garrett
  2012-03-12 20:17 ` Greg KH
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Matthew Garrett @ 2012-03-12 23:58 UTC (permalink / raw)
  To: linux-acpi; +Cc: linux-usb, lenb, gregkh, Matthew Garrett

_PLD is defined as returning a package of buffers, but many implementations
simply return a buffer. Fix this up.

(Original patch by Bob Moore <robert.moore@intel.com>)

Signed-off-by: Matthew Garrett <mjg@redhat.com>
---
 drivers/acpi/acpica/nsrepair.c |   15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/acpica/nsrepair.c b/drivers/acpi/acpica/nsrepair.c
index 9c35d20..6217cfd 100644
--- a/drivers/acpi/acpica/nsrepair.c
+++ b/drivers/acpi/acpica/nsrepair.c
@@ -151,9 +151,18 @@ acpi_ns_repair_object(struct acpi_predefined_data *data,
 		}
 	}
 	if (expected_btypes & ACPI_RTYPE_PACKAGE) {
-		status = acpi_ns_convert_to_package(return_object, &new_object);
-		if (ACPI_SUCCESS(status)) {
-			goto object_repaired;
+		if (return_object->common.type == ACPI_TYPE_BUFFER) {
+			status = acpi_ns_repair_package_list(data, &return_object);
+			if (ACPI_SUCCESS(status)) {
+				*return_object_ptr = return_object;
+				data->flags |= ACPI_OBJECT_REPAIRED;
+				return (AE_OK);
+			}
+		} else {
+			status = acpi_ns_convert_to_package(return_object, &new_object);
+			if (ACPI_SUCCESS(status)) {
+				goto object_repaired;
+			}
 		}
 	}
 
-- 
1.7.9.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-03-12 21:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-12 23:58 [PATCH 1/4] ACPI: Fix up _PLD methods Matthew Garrett
2012-03-12 20:17 ` Greg KH
2012-03-12 20:27   ` Matthew Garrett
2012-03-12 23:58 ` [PATCH 2/4] ACPI: Add _PLD support Matthew Garrett
2012-03-12 23:58 ` [PATCH 3/4] usb: Bind devices to ACPI devices when possible Matthew Garrett
2012-03-12 20:38   ` Alan Stern
     [not found]     ` <Pine.LNX.4.44L0.1203121631230.1216-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-03-12 20:56       ` Matthew Garrett
2012-03-12 21:03         ` Alan Stern
     [not found]           ` <Pine.LNX.4.44L0.1203121702000.1216-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-03-12 21:12             ` Matthew Garrett
2012-03-12 23:58 ` [PATCH 4/4] usb: Set device removable state based on ACPI USB data Matthew Garrett

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.