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)
}
}
- 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)