X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=drivers%2Fmmc%2Fcore%2Fsdio_irq.c;h=3d8ceb4084debf900693f07f1bb7a5d8588cdfab;hb=4edebed86690eb8db9af3ab85baf4a34e73266cc;hp=f573e7f9f74020dae69aa3ba861bbcadf66ffc4e;hpb=7fc86a7908a4e9eb2da4b6498f86193d113842d3;p=~andy%2Flinux diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c index f573e7f9f74..3d8ceb4084d 100644 --- a/drivers/mmc/core/sdio_irq.c +++ b/drivers/mmc/core/sdio_irq.c @@ -28,18 +28,20 @@ #include "sdio_ops.h" -static int process_sdio_pending_irqs(struct mmc_card *card) +static int process_sdio_pending_irqs(struct mmc_host *host) { + struct mmc_card *card = host->card; int i, ret, count; unsigned char pending; struct sdio_func *func; /* * Optimization, if there is only 1 function interrupt registered - * call irq handler directly + * and we know an IRQ was signaled then call irq handler directly. + * Otherwise do the full probe. */ func = card->sdio_single_irq; - if (func) { + if (func && host->sdio_irq_pending) { func->irq_handler(func); return 1; } @@ -116,7 +118,8 @@ static int sdio_irq_thread(void *_host) ret = __mmc_claim_host(host, &host->sdio_irq_thread_abort); if (ret) break; - ret = process_sdio_pending_irqs(host->card); + ret = process_sdio_pending_irqs(host); + host->sdio_irq_pending = false; mmc_release_host(host); /*