X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmmc%2Fcore%2Fsdio_irq.c;h=c292e124107ac13ec36be751024ad3728cafaa40;hb=c44df7413fd711bca818111b94cbd7ce5f3600a9;hp=e7865059e126b82ec6d330d2a899ce709d7672e0;hpb=3e01e4bcdd56209e70c39293e0c4c355d09364b8;p=linux-2.6 diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c index e7865059e1..c292e12410 100644 --- a/drivers/mmc/core/sdio_irq.c +++ b/drivers/mmc/core/sdio_irq.c @@ -45,16 +45,22 @@ static int process_sdio_pending_irqs(struct mmc_card *card) printk(KERN_WARNING "%s: pending IRQ for " "non-existant function\n", mmc_card_id(card)); + ret = -EINVAL; } else if (func->irq_handler) { func->irq_handler(func); count++; - } else + } else { printk(KERN_WARNING "%s: pending IRQ with no handler\n", sdio_func_id(func)); + ret = -EINVAL; + } } } - return count; + if (count) + return count; + + return ret; } static int sdio_irq_thread(void *_host) @@ -122,12 +128,12 @@ static int sdio_irq_thread(void *_host) } } - set_task_state(current, TASK_INTERRUPTIBLE); + set_current_state(TASK_INTERRUPTIBLE); if (host->caps & MMC_CAP_SDIO_IRQ) host->ops->enable_sdio_irq(host, 1); if (!kthread_should_stop()) schedule_timeout(period); - set_task_state(current, TASK_RUNNING); + set_current_state(TASK_RUNNING); } while (!kthread_should_stop()); if (host->caps & MMC_CAP_SDIO_IRQ)