summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2016-03-24 13:15:20 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-04-09 03:12:58 +0200
commit9f9de69d754cc9f8f2d8c21bb92275d95ddb3c77 (patch)
treeb8cb3a20ca99a67406d85e55520c5e528bf0715d
parentc68ae33e7fb4a010f9a48af3e4b87089dca96551 (diff)
downloadblackbird-op-linux-9f9de69d754cc9f8f2d8c21bb92275d95ddb3c77.tar.gz
blackbird-op-linux-9f9de69d754cc9f8f2d8c21bb92275d95ddb3c77.zip
eeepc-wmi: Use acpi_dev_found()
Use shiny new acpi_dev_found() and remove all the boilerplate to search for a particular ACPI device. No functional change. Signed-off-by: Lukas Wunner <lukas@wunner.de> Acked-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/platform/x86/eeepc-wmi.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c
index 14fd2ecb06a1..17b365f26f9d 100644
--- a/drivers/platform/x86/eeepc-wmi.c
+++ b/drivers/platform/x86/eeepc-wmi.c
@@ -204,30 +204,10 @@ static void eeepc_wmi_key_filter(struct asus_wmi_driver *asus_wmi, int *code,
}
}
-static acpi_status eeepc_wmi_parse_device(acpi_handle handle, u32 level,
- void *context, void **retval)
-{
- pr_warn("Found legacy ATKD device (%s)\n", EEEPC_ACPI_HID);
- *(bool *)context = true;
- return AE_CTRL_TERMINATE;
-}
-
-static int eeepc_wmi_check_atkd(void)
-{
- acpi_status status;
- bool found = false;
-
- status = acpi_get_devices(EEEPC_ACPI_HID, eeepc_wmi_parse_device,
- &found, NULL);
-
- if (ACPI_FAILURE(status) || !found)
- return 0;
- return -1;
-}
-
static int eeepc_wmi_probe(struct platform_device *pdev)
{
- if (eeepc_wmi_check_atkd()) {
+ if (acpi_dev_found(EEEPC_ACPI_HID)) {
+ pr_warn("Found legacy ATKD device (%s)\n", EEEPC_ACPI_HID);
pr_warn("WMI device present, but legacy ATKD device is also "
"present and enabled\n");
pr_warn("You probably booted with acpi_osi=\"Linux\" or "
OpenPOWER on IntegriCloud