Bluetooth: btmrvl: disable platform wakeup interrupt in suspend failure path
authorXinming Hu <huxm@marvell.com>
Fri, 31 Mar 2017 06:32:31 +0000 (14:32 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 12 Apr 2017 20:02:40 +0000 (22:02 +0200)
Host sleep handshake with device might been fail, disable platform wakeup
interrupt in this case.

Reported-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/btmrvl_sdio.c

index 2424ea2685a7abac4733c5575ffa6da0c8d916f6..95e40ec27c0e3e0be151455aaabb2ced5773af56 100644 (file)
@@ -1630,6 +1630,13 @@ static int btmrvl_sdio_suspend(struct device *dev)
        if (priv->adapter->hs_state != HS_ACTIVATED) {
                if (btmrvl_enable_hs(priv)) {
                        BT_ERR("HS not activated, suspend failed!");
+                       /* Disable platform specific wakeup interrupt */
+                       if (card->plt_wake_cfg &&
+                           card->plt_wake_cfg->irq_bt >= 0) {
+                               disable_irq_wake(card->plt_wake_cfg->irq_bt);
+                               disable_irq(card->plt_wake_cfg->irq_bt);
+                       }
+
                        priv->adapter->is_suspending = false;
                        return -EBUSY;
                }