diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2016-01-11 11:29:16 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-01-11 15:58:01 -0800 |
commit | 40989cf3c1e3c114d3558ad4d7513344ed612ac2 (patch) | |
tree | beab32c9b82309bc5f30c5cab2a4e3bd45180900 /drivers/staging/greybus/arche-apb-ctrl.c | |
parent | d258432fb2fbf1a5a4910dbc31aba99d04801268 (diff) | |
download | op-kernel-dev-40989cf3c1e3c114d3558ad4d7513344ed612ac2.zip op-kernel-dev-40989cf3c1e3c114d3558ad4d7513344ed612ac2.tar.gz |
greybus: arche-apb: Drop unnecessary checks
wake_detect_gpio and resetn_gpio are guaranteed to be valid in
apb_ctrl_cleanup() and irq-handler, no need to check for their validity.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/arche-apb-ctrl.c')
-rw-r--r-- | drivers/staging/greybus/arche-apb-ctrl.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/staging/greybus/arche-apb-ctrl.c b/drivers/staging/greybus/arche-apb-ctrl.c index 859d22e..04c4467 100644 --- a/drivers/staging/greybus/arche-apb-ctrl.c +++ b/drivers/staging/greybus/arche-apb-ctrl.c @@ -94,10 +94,6 @@ static irqreturn_t apb_ctrl_wake_detect_irq(int irq, void *devid) * signals, especially when we start using GPIOs over slow * buses like I2C. */ - if (!gpio_is_valid(apb->wake_detect_gpio) && - !gpio_is_valid(apb->resetn_gpio)) - return IRQ_HANDLED; /* Should it be IRQ_NONE ?? */ - spin_lock_irqsave(&apb->lock, flags); if (apb->state != APB_STATE_ACTIVE) { @@ -293,9 +289,7 @@ static void apb_ctrl_cleanup(struct arche_apb_ctrl_drvdata *apb) spin_lock_irqsave(&apb->lock, flags); /* As part of exit, put APB back in reset state */ - if (gpio_is_valid(apb->resetn_gpio)) - gpio_set_value(apb->resetn_gpio, 0); - + gpio_set_value(apb->resetn_gpio, 0); apb->state = APB_STATE_OFF; spin_unlock_irqrestore(&apb->lock, flags); |