]> rtime.felk.cvut.cz Git - linux-imx.git/blobdiff - drivers/pnp/pnpacpi/core.c
PNPACPI: Fix acpi_bus_get_device() check in drivers/pnp/pnpacpi/core.c
[linux-imx.git] / drivers / pnp / pnpacpi / core.c
index 72e822e17d475c3ba632fc8e33afbadc55d52d33..8813fc03aa099fbb37b3a2321160fef4cdd51ef0 100644 (file)
@@ -90,7 +90,7 @@ static int pnpacpi_set_resources(struct pnp_dev *dev)
        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(struct pnp_dev *dev)
        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 pnp_dev *dev)
        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_dev *dev, pm_message_t state)
        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 *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;
        }