diff mbox

[v4,1/4] mwifiex: remove unnecessary wakeup interrupt number sanity check

Message ID 1492066102-31251-1-git-send-email-huxinming820@gmail.com (mailing list archive)
State Accepted
Commit 625b4dba57b256943a1714c7783e3cfbb52ce5c3
Delegated to: Kalle Valo
Headers show

Commit Message

Xinming Hu April 13, 2017, 6:48 a.m. UTC
From: Xinming Hu <huxm@marvell.com>

If wakeup interrupt handler is called, we know that the wakeup
interrupt number is valid, there is no need to check it.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
---
v2: modify description(Dimtry)
v4: same as v2, v3
---
 drivers/net/wireless/marvell/mwifiex/main.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Comments

Kalle Valo April 20, 2017, 7:18 a.m. UTC | #1
Xinming Hu <huxinming820@gmail.com> wrote:
> From: Xinming Hu <huxm@marvell.com>
> 
> If wakeup interrupt handler is called, we know that the wakeup
> interrupt number is valid, there is no need to check it.
> 
> Signed-off-by: Xinming Hu <huxm@marvell.com>
> Signed-off-by: Cathy Luo <cluo@marvell.com>
> Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
> Reviewed-by: Brian Norris <briannorris@chromium.org>

3 patches applied to wireless-drivers-next.git, thanks.

625b4dba57b2 mwifiex: remove unnecessary wakeup interrupt number sanity check
ef6c7d3cb731 mwifiex: fall back mwifiex_dbg to pr_info when adapter->dev not set
127ee1db0970 mwifiex: pcie: correct scratch register name
diff mbox

Patch

diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c
index 0dfbac8..98fd491 100644
--- a/drivers/net/wireless/marvell/mwifiex/main.c
+++ b/drivers/net/wireless/marvell/mwifiex/main.c
@@ -1513,11 +1513,9 @@  static irqreturn_t mwifiex_irq_wakeup_handler(int irq, void *priv)
 {
 	struct mwifiex_adapter *adapter = priv;
 
-	if (adapter->irq_wakeup >= 0) {
-		dev_dbg(adapter->dev, "%s: wake by wifi", __func__);
-		adapter->wake_by_wifi = true;
-		disable_irq_nosync(irq);
-	}
+	dev_dbg(adapter->dev, "%s: wake by wifi", __func__);
+	adapter->wake_by_wifi = true;
+	disable_irq_nosync(irq);
 
 	/* Notify PM core we are wakeup source */
 	pm_wakeup_event(adapter->dev, 0);