diff mbox

[0/4] Fix acpi_bus_get_device() check

Message ID 5109E21C.4010904@jp.fujitsu.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Yasuaki Ishimatsu Jan. 31, 2013, 3:16 a.m. UTC
acpi_bus_get_device() returns int not acpi_status.

The patch change not to apply ACPI_FAILURE() to the return value of
acpi_bus_get_device().

Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
---
  drivers/pnp/pnpacpi/core.c |   10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

Index: linux-pm/drivers/pnp/pnpacpi/core.c
===================================================================
--- linux-pm.orig/drivers/pnp/pnpacpi/core.c	2013-01-31 11:04:43.000000000 +0900
+++ linux-pm/drivers/pnp/pnpacpi/core.c	2013-01-31 11:38:47.659849883 +0900
@@ -90,7 +90,7 @@  static int pnpacpi_set_resources(struct
  	pnp_dbg(&dev->dev, "set resources\n");
  
  	handle = DEVICE_ACPI_HANDLE(&dev->dev);
-	if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &acpi_dev))) {
+	if (!handle || acpi_bus_get_device(handle, &acpi_dev)) {
  		dev_dbg(&dev->dev, "ACPI device not found in %s!\n", __func__);
  		return -ENODEV;
  	}
@@ -123,7 +123,7 @@  static int pnpacpi_disable_resources(str
  	dev_dbg(&dev->dev, "disable resources\n");
  
  	handle = DEVICE_ACPI_HANDLE(&dev->dev);
-	if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &acpi_dev))) {
+	if (!handle || acpi_bus_get_device(handle, &acpi_dev)) {
  		dev_dbg(&dev->dev, "ACPI device not found in %s!\n", __func__);
  		return 0;
  	}
@@ -145,7 +145,7 @@  static bool pnpacpi_can_wakeup(struct pn
  	acpi_handle handle;
  
  	handle = DEVICE_ACPI_HANDLE(&dev->dev);
-	if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &acpi_dev))) {
+	if (!handle || acpi_bus_get_device(handle, &acpi_dev)) {
  		dev_dbg(&dev->dev, "ACPI device not found in %s!\n", __func__);
  		return false;
  	}
@@ -160,7 +160,7 @@  static int pnpacpi_suspend(struct pnp_de
  	int error = 0;
  
  	handle = DEVICE_ACPI_HANDLE(&dev->dev);
-	if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &acpi_dev))) {
+	if (!handle || acpi_bus_get_device(handle, &acpi_dev)) {
  		dev_dbg(&dev->dev, "ACPI device not found in %s!\n", __func__);
  		return 0;
  	}
@@ -197,7 +197,7 @@  static int pnpacpi_resume(struct pnp_dev
  	acpi_handle handle = DEVICE_ACPI_HANDLE(&dev->dev);
  	int error = 0;
  
-	if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &acpi_dev))) {
+	if (!handle || acpi_bus_get_device(handle, &acpi_dev)) {
  		dev_dbg(&dev->dev, "ACPI device not found in %s!\n", __func__);
  		return -ENODEV;
  	}