mwifiex: handle error if IRQ request fails in mwifiex_sdio_of()
authorAmitkumar Karwar <akarwar@marvell.com>
Fri, 9 Sep 2016 10:57:58 +0000 (16:27 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 14 Sep 2016 17:00:01 +0000 (20:00 +0300)
When this failure occurs, we will clear card->plt_wake_cfg so that
device would initialize without wake up on external interrupt feature.
This feature specific code in suspend and resume handlers will be
skipped.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/sdio.c

index 6dba40998a6676a979e7666dd3489c61de4bfd3a..8718950004f3f6e5bda50b38c9fbf42d7cf474a6 100644 (file)
@@ -122,9 +122,11 @@ static int mwifiex_sdio_probe_of(struct device *dev, struct sdio_mmc_card *card)
                                               IRQF_TRIGGER_LOW,
                                               "wifi_wake", cfg);
                        if (ret) {
-                               dev_err(dev,
+                               dev_dbg(dev,
                                        "Failed to request irq_wifi %d (%d)\n",
                                        cfg->irq_wifi, ret);
+                               card->plt_wake_cfg = NULL;
+                               return 0;
                        }
                        disable_irq(cfg->irq_wifi);
                }