aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/ec.c
diff options
context:
space:
mode:
authorJiang Liu <jiang.liu@huawei.com>2013-06-28 12:24:38 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-07-14 19:33:10 -0400
commit952c63e9512b63220886105cfc791507046fa39a (patch)
treebf3bd0592ea0fac74418fe16b8a4125e2db799ea /drivers/acpi/ec.c
parent472d963befe28b8614ea2789757b27536c8d79eb (diff)
ACPI: introduce helper function acpi_has_method()
Introduce helper function acpi_has_method() and use it in a number of places to simplify code. [rjw: Changelog] Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/ec.c')
-rw-r--r--drivers/acpi/ec.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 80403c1a89f8..84bf06cec1f2 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -1049,10 +1049,8 @@ int __init acpi_ec_ecdt_probe(void)
1049 * which needs it, has fake EC._INI method, so use it as flag. 1049 * which needs it, has fake EC._INI method, so use it as flag.
1050 * Keep boot_ec struct as it will be needed soon. 1050 * Keep boot_ec struct as it will be needed soon.
1051 */ 1051 */
1052 acpi_handle dummy;
1053 if (!dmi_name_in_vendors("ASUS") || 1052 if (!dmi_name_in_vendors("ASUS") ||
1054 ACPI_FAILURE(acpi_get_handle(boot_ec->handle, "_INI", 1053 !acpi_has_method(boot_ec->handle, "_INI"))
1055 &dummy)))
1056 return -ENODEV; 1054 return -ENODEV;
1057 } 1055 }
1058install: 1056install: