Skip to content

Commit 39d2969

Browse files
esmilstorulf
authored andcommitted
mmc: uniphier-sd: Use new tasklet API
This converts the driver to use the new tasklet API introduced in commit 12cc923 ("tasklet: Introduce new initialization API") Signed-off-by: Emil Renner Berthing <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent c36dd04 commit 39d2969

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

drivers/mmc/host/uniphier-sd.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ static void uniphier_sd_dma_endisable(struct tmio_mmc_host *host, int enable)
8181
}
8282

8383
/* external DMA engine */
84-
static void uniphier_sd_external_dma_issue(unsigned long arg)
84+
static void uniphier_sd_external_dma_issue(struct tasklet_struct *t)
8585
{
86-
struct tmio_mmc_host *host = (void *)arg;
86+
struct tmio_mmc_host *host = from_tasklet(host, t, dma_issue);
8787
struct uniphier_sd_priv *priv = uniphier_sd_priv(host);
8888

8989
uniphier_sd_dma_endisable(host, 1);
@@ -190,8 +190,7 @@ static void uniphier_sd_external_dma_request(struct tmio_mmc_host *host,
190190
host->chan_rx = chan;
191191
host->chan_tx = chan;
192192

193-
tasklet_init(&host->dma_issue, uniphier_sd_external_dma_issue,
194-
(unsigned long)host);
193+
tasklet_setup(&host->dma_issue, uniphier_sd_external_dma_issue);
195194
}
196195

197196
static void uniphier_sd_external_dma_release(struct tmio_mmc_host *host)
@@ -228,9 +227,9 @@ static const struct tmio_mmc_dma_ops uniphier_sd_external_dma_ops = {
228227
.dataend = uniphier_sd_external_dma_dataend,
229228
};
230229

231-
static void uniphier_sd_internal_dma_issue(unsigned long arg)
230+
static void uniphier_sd_internal_dma_issue(struct tasklet_struct *t)
232231
{
233-
struct tmio_mmc_host *host = (void *)arg;
232+
struct tmio_mmc_host *host = from_tasklet(host, t, dma_issue);
234233
unsigned long flags;
235234

236235
spin_lock_irqsave(&host->lock, flags);
@@ -309,8 +308,7 @@ static void uniphier_sd_internal_dma_request(struct tmio_mmc_host *host,
309308

310309
host->chan_tx = (void *)0xdeadbeaf;
311310

312-
tasklet_init(&host->dma_issue, uniphier_sd_internal_dma_issue,
313-
(unsigned long)host);
311+
tasklet_setup(&host->dma_issue, uniphier_sd_internal_dma_issue);
314312
}
315313

316314
static void uniphier_sd_internal_dma_release(struct tmio_mmc_host *host)

0 commit comments

Comments
 (0)