Skip to content

Commit 2c32dbb

Browse files
author
Ulf Hansson
committed
mmc: core: Clarify that the ->ack_sdio_irq() callback is mandatory
For the MMC_CAP2_SDIO_IRQ_NOTHREAD case and when using sdio_signal_irq(), the ->ack_sdio_irq() is already mandatory, which was not the case for those host drivers that called sdio_run_irqs() directly. As there are no longer any drivers calling sdio_run_irqs(), let's clarify the code by dropping the unnecessary check and explicitly state that the callback is mandatory in the header file. Tested-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 36d57ef commit 2c32dbb

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/mmc/core/sdio_irq.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ static void sdio_run_irqs(struct mmc_host *host)
115115
mmc_claim_host(host);
116116
if (host->sdio_irqs) {
117117
process_sdio_pending_irqs(host);
118-
if (host->ops->ack_sdio_irq)
119-
host->ops->ack_sdio_irq(host);
118+
host->ops->ack_sdio_irq(host);
120119
}
121120
mmc_release_host(host);
122121
}

‎include/linux/mmc/host.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ struct mmc_host_ops {
128128
int (*get_cd)(struct mmc_host *host);
129129

130130
void (*enable_sdio_irq)(struct mmc_host *host, int enable);
131+
/* Mandatory callback when using MMC_CAP2_SDIO_IRQ_NOTHREAD. */
131132
void (*ack_sdio_irq)(struct mmc_host *host);
132133

133134
/* optional callback for HC quirks */

0 commit comments

Comments
 (0)