mmc: tifm_sd: Use new tasklet API
authorEmil Renner Berthing <kernel@esmil.dk>
Thu, 4 Feb 2021 15:18:44 +0000 (16:18 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 8 Feb 2021 12:00:31 +0000 (13:00 +0100)
This converts the driver to use the new tasklet API introduced in
commit 12cc923f1ccc ("tasklet: Introduce new initialization API")

Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Link: https://lore.kernel.org/r/20210204151847.91353-7-kernel@esmil.dk
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/tifm_sd.c

index fd8b72d3e02c9a36c55bc40a647d2dbe8e415158..9fdf7ea06e3fd6c4e159fc55d94132d5099f3647 100644 (file)
@@ -731,9 +731,9 @@ err_out:
        mmc_request_done(mmc, mrq);
 }
 
-static void tifm_sd_end_cmd(unsigned long data)
+static void tifm_sd_end_cmd(struct tasklet_struct *t)
 {
-       struct tifm_sd *host = (struct tifm_sd*)data;
+       struct tifm_sd *host = from_tasklet(host, t, finish_tasklet);
        struct tifm_dev *sock = host->dev;
        struct mmc_host *mmc = tifm_get_drvdata(sock);
        struct mmc_request *mrq;
@@ -968,8 +968,7 @@ static int tifm_sd_probe(struct tifm_dev *sock)
         */
        mmc->max_busy_timeout = TIFM_MMCSD_REQ_TIMEOUT_MS;
 
-       tasklet_init(&host->finish_tasklet, tifm_sd_end_cmd,
-                    (unsigned long)host);
+       tasklet_setup(&host->finish_tasklet, tifm_sd_end_cmd);
        timer_setup(&host->timer, tifm_sd_abort, 0);
 
        mmc->ops = &tifm_sd_ops;