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 1/4] ACPI: Fix up _PLD methods
Date: Mon, 12 Mar 2012 19:58:52 -0400 [thread overview]
Message-ID: <1331596735-3690-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
next reply other threads:[~2012-03-12 19:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-12 23:58 Matthew Garrett [this message]
2012-03-12 20:17 ` [PATCH 1/4] ACPI: Fix up _PLD methods 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
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=1331596735-3690-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