summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@gmail.com>2014-09-17 00:13:55 +0300
committerDarren Hart <dvhart@linux.intel.com>2014-09-17 13:55:53 -0700
commitd46a76405fad48a7efc3faf07545fa886a3b271a (patch)
treea1534fc46a7408ec220c9fa9d120a288bbc1b650 /drivers/platform
parent72a979f09fa9111fd6be8326e5f21319ff6918fb (diff)
downloadblackbird-op-linux-d46a76405fad48a7efc3faf07545fa886a3b271a.tar.gz
blackbird-op-linux-d46a76405fad48a7efc3faf07545fa886a3b271a.zip
intel-rst: Use ACPI_FAILURE() macro instead !ACPI_SUCCESS() for error checking
ACPI_SUCCESS is defined as: #define ACPI_SUCCESS(a) (!(a)) There is no need for the the double ! since there is already a macro defined for failures: ACPI_FAILURE() Signed-off-by: Peter Ujfalusi <peter.ujfalusi@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/intel-rst.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/platform/x86/intel-rst.c b/drivers/platform/x86/intel-rst.c
index d45bca34bf1b..8c6a8fed8a08 100644
--- a/drivers/platform/x86/intel-rst.c
+++ b/drivers/platform/x86/intel-rst.c
@@ -35,7 +35,7 @@ static ssize_t irst_show_wakeup_events(struct device *dev,
acpi = to_acpi_device(dev);
status = acpi_evaluate_integer(acpi->handle, "GFFS", NULL, &value);
- if (!ACPI_SUCCESS(status))
+ if (ACPI_FAILURE(status))
return -EINVAL;
return sprintf(buf, "%lld\n", value);
@@ -59,7 +59,7 @@ static ssize_t irst_store_wakeup_events(struct device *dev,
status = acpi_execute_simple_method(acpi->handle, "SFFS", value);
- if (!ACPI_SUCCESS(status))
+ if (ACPI_FAILURE(status))
return -EINVAL;
return count;
@@ -81,7 +81,7 @@ static ssize_t irst_show_wakeup_time(struct device *dev,
acpi = to_acpi_device(dev);
status = acpi_evaluate_integer(acpi->handle, "GFTV", NULL, &value);
- if (!ACPI_SUCCESS(status))
+ if (ACPI_FAILURE(status))
return -EINVAL;
return sprintf(buf, "%lld\n", value);
@@ -105,7 +105,7 @@ static ssize_t irst_store_wakeup_time(struct device *dev,
status = acpi_execute_simple_method(acpi->handle, "SFTV", value);
- if (!ACPI_SUCCESS(status))
+ if (ACPI_FAILURE(status))
return -EINVAL;
return count;
OpenPOWER on IntegriCloud