Commit 9f9de69d authored by Lukas Wunner's avatar Lukas Wunner Committed by Rafael J. Wysocki

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: default avatarLukas Wunner <lukas@wunner.de>
Acked-by: default avatarDarren Hart <dvhart@linux.intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent c68ae33e
...@@ -204,30 +204,10 @@ static void eeepc_wmi_key_filter(struct asus_wmi_driver *asus_wmi, int *code, ...@@ -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) 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 " pr_warn("WMI device present, but legacy ATKD device is also "
"present and enabled\n"); "present and enabled\n");
pr_warn("You probably booted with acpi_osi=\"Linux\" or " pr_warn("You probably booted with acpi_osi=\"Linux\" or "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment