summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/intel-hid.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2016-09-19 04:33:51 +0300
committerDarren Hart <dvhart@linux.intel.com>2016-12-13 20:29:01 +0300
commit3526ecadc86cc1d485153255498cde7d0275dd37 (patch)
tree2b46fccd8bda332ae1ca2b9c91e6b28f0114e86e /drivers/platform/x86/intel-hid.c
parent5dc444b804eae57abaf6f05663d9cb9f030bb9d2 (diff)
downloadlinux-3526ecadc86cc1d485153255498cde7d0275dd37.tar.xz
platform/x86: Use ACPI_FAILURE at appropriate places
Use ACPI_FAILURE() to replace !ACPI_SUCCESS(), this avoid !! operations. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/platform/x86/intel-hid.c')
-rw-r--r--drivers/platform/x86/intel-hid.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/platform/x86/intel-hid.c b/drivers/platform/x86/intel-hid.c
index ed5874217ee7..00cbeca2108d 100644
--- a/drivers/platform/x86/intel-hid.c
+++ b/drivers/platform/x86/intel-hid.c
@@ -69,7 +69,7 @@ static int intel_hid_set_enable(struct device *device, int enable)
arg0.integer.value = enable;
status = acpi_evaluate_object(ACPI_HANDLE(device), "HDSM", &args, NULL);
- if (!ACPI_SUCCESS(status)) {
+ if (ACPI_FAILURE(status)) {
dev_warn(device, "failed to %sable hotkeys\n",
enable ? "en" : "dis");
return -EIO;
@@ -148,7 +148,7 @@ static void notify_handler(acpi_handle handle, u32 event, void *context)
}
status = acpi_evaluate_integer(handle, "HDEM", NULL, &ev_index);
- if (!ACPI_SUCCESS(status)) {
+ if (ACPI_FAILURE(status)) {
dev_warn(&device->dev, "failed to get event index\n");
return;
}
@@ -167,7 +167,7 @@ static int intel_hid_probe(struct platform_device *device)
int err;
status = acpi_evaluate_integer(handle, "HDMM", NULL, &mode);
- if (!ACPI_SUCCESS(status)) {
+ if (ACPI_FAILURE(status)) {
dev_warn(&device->dev, "failed to read mode\n");
return -ENODEV;
}