Commit d46a7640 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Darren Hart

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: default avatarPeter Ujfalusi <peter.ujfalusi@gmail.com>
Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
parent 72a979f0
...@@ -35,7 +35,7 @@ static ssize_t irst_show_wakeup_events(struct device *dev, ...@@ -35,7 +35,7 @@ static ssize_t irst_show_wakeup_events(struct device *dev,
acpi = to_acpi_device(dev); acpi = to_acpi_device(dev);
status = acpi_evaluate_integer(acpi->handle, "GFFS", NULL, &value); status = acpi_evaluate_integer(acpi->handle, "GFFS", NULL, &value);
if (!ACPI_SUCCESS(status)) if (ACPI_FAILURE(status))
return -EINVAL; return -EINVAL;
return sprintf(buf, "%lld\n", value); return sprintf(buf, "%lld\n", value);
...@@ -59,7 +59,7 @@ static ssize_t irst_store_wakeup_events(struct device *dev, ...@@ -59,7 +59,7 @@ static ssize_t irst_store_wakeup_events(struct device *dev,
status = acpi_execute_simple_method(acpi->handle, "SFFS", value); status = acpi_execute_simple_method(acpi->handle, "SFFS", value);
if (!ACPI_SUCCESS(status)) if (ACPI_FAILURE(status))
return -EINVAL; return -EINVAL;
return count; return count;
...@@ -81,7 +81,7 @@ static ssize_t irst_show_wakeup_time(struct device *dev, ...@@ -81,7 +81,7 @@ static ssize_t irst_show_wakeup_time(struct device *dev,
acpi = to_acpi_device(dev); acpi = to_acpi_device(dev);
status = acpi_evaluate_integer(acpi->handle, "GFTV", NULL, &value); status = acpi_evaluate_integer(acpi->handle, "GFTV", NULL, &value);
if (!ACPI_SUCCESS(status)) if (ACPI_FAILURE(status))
return -EINVAL; return -EINVAL;
return sprintf(buf, "%lld\n", value); return sprintf(buf, "%lld\n", value);
...@@ -105,7 +105,7 @@ static ssize_t irst_store_wakeup_time(struct device *dev, ...@@ -105,7 +105,7 @@ static ssize_t irst_store_wakeup_time(struct device *dev,
status = acpi_execute_simple_method(acpi->handle, "SFTV", value); status = acpi_execute_simple_method(acpi->handle, "SFTV", value);
if (!ACPI_SUCCESS(status)) if (ACPI_FAILURE(status))
return -EINVAL; return -EINVAL;
return count; return count;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment