mmc: core: Clarify that the ->ack_sdio_irq() callback is mandatory
authorUlf Hansson <ulf.hansson@linaro.org>
Sun, 8 Sep 2019 10:12:31 +0000 (12:12 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 11 Sep 2019 14:10:18 +0000 (16:10 +0200)
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>
drivers/mmc/core/sdio_irq.c
include/linux/mmc/host.h

index 0962a4357d54d8e0b0c9165a89bd34e518e6a821..d7965b53a6d2655b247990ce678d45381b04fe09 100644 (file)
@@ -115,8 +115,7 @@ static void sdio_run_irqs(struct mmc_host *host)
        mmc_claim_host(host);
        if (host->sdio_irqs) {
                process_sdio_pending_irqs(host);
-               if (host->ops->ack_sdio_irq)
-                       host->ops->ack_sdio_irq(host);
+               host->ops->ack_sdio_irq(host);
        }
        mmc_release_host(host);
 }
index cf87c673cbb8188a2bad54914c4b66032977980b..4704b77259ee22c68e566f64f0c3e8358d3c7eb9 100644 (file)
@@ -128,6 +128,7 @@ struct mmc_host_ops {
        int     (*get_cd)(struct mmc_host *host);
 
        void    (*enable_sdio_irq)(struct mmc_host *host, int enable);
+       /* Mandatory callback when using MMC_CAP2_SDIO_IRQ_NOTHREAD. */
        void    (*ack_sdio_irq)(struct mmc_host *host);
 
        /* optional callback for HC quirks */