aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@gmail.com>2014-09-16 17:13:55 -0400
committerDarren Hart <dvhart@linux.intel.com>2014-09-17 16:55:53 -0400
commitd46a76405fad48a7efc3faf07545fa886a3b271a (patch)
treea1534fc46a7408ec220c9fa9d120a288bbc1b650
parent72a979f09fa9111fd6be8326e5f21319ff6918fb (diff)
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>
-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,
35 acpi = to_acpi_device(dev); 35 acpi = to_acpi_device(dev);
36 36
37 status = acpi_evaluate_integer(acpi->handle, "GFFS", NULL, &value); 37 status = acpi_evaluate_integer(acpi->handle, "GFFS", NULL, &value);
38 if (!ACPI_SUCCESS(status)) 38 if (ACPI_FAILURE(status))
39 return -EINVAL; 39 return -EINVAL;
40 40
41 return sprintf(buf, "%lld\n", value); 41 return sprintf(buf, "%lld\n", value);
@@ -59,7 +59,7 @@ static ssize_t irst_store_wakeup_events(struct device *dev,
59 59
60 status = acpi_execute_simple_method(acpi->handle, "SFFS", value); 60 status = acpi_execute_simple_method(acpi->handle, "SFFS", value);
61 61
62 if (!ACPI_SUCCESS(status)) 62 if (ACPI_FAILURE(status))
63 return -EINVAL; 63 return -EINVAL;
64 64
65 return count; 65 return count;
@@ -81,7 +81,7 @@ static ssize_t irst_show_wakeup_time(struct device *dev,
81 acpi = to_acpi_device(dev); 81 acpi = to_acpi_device(dev);
82 82
83 status = acpi_evaluate_integer(acpi->handle, "GFTV", NULL, &value); 83 status = acpi_evaluate_integer(acpi->handle, "GFTV", NULL, &value);
84 if (!ACPI_SUCCESS(status)) 84 if (ACPI_FAILURE(status))
85 return -EINVAL; 85 return -EINVAL;
86 86
87 return sprintf(buf, "%lld\n", value); 87 return sprintf(buf, "%lld\n", value);
@@ -105,7 +105,7 @@ static ssize_t irst_store_wakeup_time(struct device *dev,
105 105
106 status = acpi_execute_simple_method(acpi->handle, "SFTV", value); 106 status = acpi_execute_simple_method(acpi->handle, "SFTV", value);
107 107
108 if (!ACPI_SUCCESS(status)) 108 if (ACPI_FAILURE(status))
109 return -EINVAL; 109 return -EINVAL;
110 110
111 return count; 111 return count;