From: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
To: linux-pci@vger.kernel.org, linux acpi <linux-acpi@vger.kernel.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>,
Len Brown <lenb@kernel.org>, "Li, Shaohua" <shaohua.li@intel.com>
Subject: [PATCH 3/5] pci-acpi: add flag to indicate query had been done
Date: Thu, 15 May 2008 15:21:16 +0900 [thread overview]
Message-ID: <482BD65C.4070001@jp.fujitsu.com> (raw)
In-Reply-To: <482BD572.30504@jp.fujitsu.com>
Current pci-acpi implementation checks osc_data->support_stat to see
if control bits had been already queried. It is not good from the
viewpoint of easy understanding. So this patch adds new 'is_queried'
flag to indicate query had been done.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
---
drivers/pci/pci-acpi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: linux-2.6.26-rc2-git3/drivers/pci/pci-acpi.c
===================================================================
--- linux-2.6.26-rc2-git3.orig/drivers/pci/pci-acpi.c
+++ linux-2.6.26-rc2-git3/drivers/pci/pci-acpi.c
@@ -23,6 +23,7 @@ struct acpi_osc_data {
acpi_handle handle;
u32 support_set;
u32 control_set;
+ int is_queried;
u32 query_result;
struct list_head sibiling;
};
@@ -147,6 +148,7 @@ static acpi_status acpi_query_osc(acpi_h
if (ACPI_SUCCESS(status)) {
osc_data->support_set = support_set;
osc_data->query_result = osc_args.query_result;
+ osc_data->is_queried = 1;
}
return status;
@@ -203,7 +205,7 @@ acpi_status pci_osc_control_set(acpi_han
if (!ctrlset)
return AE_TYPE;
- if (osc_data->support_set &&
+ if (osc_data->is_queried &&
((osc_data->query_result & ctrlset) != ctrlset))
return AE_SUPPORT;
next prev parent reply other threads:[~2008-05-15 6:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-15 6:17 [PATCH 0/5] pci-acpi: improvement for _OSC evaluation Kenji Kaneshige
2008-05-15 6:18 ` [PATCH 1/5] pci-acpi: remove duplicate code for _OSC Kenji Kaneshige
2008-05-15 6:20 ` [PATCH 2/5] pci-acpi: use local buffer " Kenji Kaneshige
2008-05-15 6:21 ` Kenji Kaneshige [this message]
2008-05-15 6:22 ` [PATCH 4/5] pci-acpi: remove unused variable in __pci_osc_support_set Kenji Kaneshige
2008-05-15 6:23 ` [PATCH 5/5] pci-acpi: minor cleanups for _OSC Kenji Kaneshige
2008-05-16 18:00 ` [PATCH 0/5] pci-acpi: improvement for _OSC evaluation Jesse Barnes
2008-05-19 3:29 ` Shaohua Li
2008-05-19 22:27 ` Jesse Barnes
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=482BD65C.4070001@jp.fujitsu.com \
--to=kaneshige.kenji@jp.fujitsu.com \
--cc=jbarnes@virtuousgeek.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=shaohua.li@intel.com \
/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