public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg@redhat.com>
To: linux-acpi@vger.kernel.org
Cc: linux-usb@vger.kernel.org, lenb@kernel.org,
	gregkh@linuxfoundation.org, Matthew Garrett <mjg@redhat.com>
Subject: [PATCH V2 1/4] ACPI: Fix up _PLD methods
Date: Mon, 12 Mar 2012 17:45:44 -0400	[thread overview]
Message-ID: <1331588747-1247-1-git-send-email-mjg@redhat.com> (raw)

_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


             reply	other threads:[~2012-03-12 21:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-12 21:45 Matthew Garrett [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1331588747-1247-1-git-send-email-mjg@redhat.com \
    --to=mjg@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox