public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 1/4] ACPI: Fix up _PLD methods
@ 2012-03-12 21:45 Matthew Garrett
  2012-03-12 21:45 ` [PATCH V2 2/4] ACPI: Add _PLD support Matthew Garrett
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Matthew Garrett @ 2012-03-12 21:45 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] 15+ messages in thread

end of thread, other threads:[~2012-04-10 13:01 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-12 21:45 [PATCH V2 1/4] ACPI: Fix up _PLD methods Matthew Garrett
2012-03-12 21:45 ` [PATCH V2 2/4] ACPI: Add _PLD support Matthew Garrett
2012-03-13 11:07 ` [PATCH V2 1/4] ACPI: Fix up _PLD methods Sergei Shtylyov
     [not found]   ` <4F5F2A64.8030403-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
2012-03-13 11:38     ` Matthew Garrett
     [not found] ` <1331588747-1247-1-git-send-email-mjg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-03-12 21:45   ` [PATCH V2 3/4] usb: Bind devices to ACPI devices when possible Matthew Garrett
     [not found]     ` <1331588747-1247-3-git-send-email-mjg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-03-14  1:20       ` Lan Tianyu
2012-03-14 12:48         ` Matthew Garrett
2012-03-14 14:29           ` Greg KH
2012-03-14 14:44             ` Alan Stern
2012-03-12 21:45   ` [PATCH V2 4/4] usb: Set device removable state based on ACPI USB data Matthew Garrett
2012-03-13 21:32   ` [PATCH V2 1/4] ACPI: Fix up _PLD methods Greg KH
2012-03-13 21:38     ` Matthew Garrett
2012-03-13 21:49       ` Greg KH
     [not found]         ` <20120313214941.GA4534-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2012-04-10  7:56           ` Lan, Tianyu
     [not found]             ` <4CFBC02C07DA244CA19D6815A05BE6EE05C77B-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2012-04-10 13:01               ` Moore, Robert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox