diff options
author | Lukas Wunner <lukas@wunner.de> | 2016-03-24 08:15:20 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-04-08 21:12:58 -0400 |
commit | 9f9de69d754cc9f8f2d8c21bb92275d95ddb3c77 (patch) | |
tree | b8cb3a20ca99a67406d85e55520c5e528bf0715d | |
parent | c68ae33e7fb4a010f9a48af3e4b87089dca96551 (diff) |
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.c | 24 |
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, | |||
204 | } | 204 | } |
205 | } | 205 | } |
206 | 206 | ||
207 | static acpi_status eeepc_wmi_parse_device(acpi_handle handle, u32 level, | ||
208 | void *context, void **retval) | ||
209 | { | ||
210 | pr_warn("Found legacy ATKD device (%s)\n", EEEPC_ACPI_HID); | ||
211 | *(bool *)context = true; | ||
212 | return AE_CTRL_TERMINATE; | ||
213 | } | ||
214 | |||
215 | static int eeepc_wmi_check_atkd(void) | ||
216 | { | ||
217 | acpi_status status; | ||
218 | bool found = false; | ||
219 | |||
220 | status = acpi_get_devices(EEEPC_ACPI_HID, eeepc_wmi_parse_device, | ||
221 | &found, NULL); | ||
222 | |||
223 | if (ACPI_FAILURE(status) || !found) | ||
224 | return 0; | ||
225 | return -1; | ||
226 | } | ||
227 | |||
228 | static int eeepc_wmi_probe(struct platform_device *pdev) | 207 | static int eeepc_wmi_probe(struct platform_device *pdev) |
229 | { | 208 | { |
230 | if (eeepc_wmi_check_atkd()) { | 209 | if (acpi_dev_found(EEEPC_ACPI_HID)) { |
210 | pr_warn("Found legacy ATKD device (%s)\n", EEEPC_ACPI_HID); | ||
231 | pr_warn("WMI device present, but legacy ATKD device is also " | 211 | pr_warn("WMI device present, but legacy ATKD device is also " |
232 | "present and enabled\n"); | 212 | "present and enabled\n"); |
233 | pr_warn("You probably booted with acpi_osi=\"Linux\" or " | 213 | pr_warn("You probably booted with acpi_osi=\"Linux\" or " |