greybus: db3-platform: fix code that fetches reset GPIO
authorAlex Elder <elder@linaro.org>
Thu, 22 Oct 2015 13:58:16 +0000 (08:58 -0500)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 22 Oct 2015 20:46:50 +0000 (13:46 -0700)
The code that fetches the reset GPIO for an AP bridge suffers
from an apparent copy/paste error.  Fix it.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/db3-platform.c

index 4391348..61048f5 100644 (file)
@@ -196,10 +196,10 @@ static int apb_ctrl_get_devtree_data(struct device *dev,
        }
 
        apb_data->ctrl.reset = of_get_named_gpio(np, "reset-gpios", 0);
-       if (apb_data->ctrl.wake_detect < 0 ||
+       if (apb_data->ctrl.reset < 0 ||
                        !gpio_is_valid(apb_data->ctrl.reset)) {
-               dev_err(dev, "failed to get wake detect gpio\n");
-               return apb_data->ctrl.wake_detect;
+               dev_err(dev, "failed to get reset gpio\n");
+               return apb_data->ctrl.reset;
        }
 
        apb_data->ctrl.boot_ret = of_get_named_gpio(np, "boot-ret-gpios", 0);