From: Alex Elder Date: Thu, 22 Oct 2015 13:58:16 +0000 (-0500) Subject: greybus: db3-platform: fix code that fetches reset GPIO X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~1093 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=d934a88d50f92230e48b944c729021fc39c65d98;p=linux.git greybus: db3-platform: fix code that fetches reset GPIO 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 Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/db3-platform.c b/drivers/staging/greybus/db3-platform.c index 4391348ffc0d..61048f56b43c 100644 --- a/drivers/staging/greybus/db3-platform.c +++ b/drivers/staging/greybus/db3-platform.c @@ -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);