[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200817083508.22657-4-allen.lkml@gmail.com>
Date: Mon, 17 Aug 2020 14:05:01 +0530
From: Allen Pais <allen.lkml@...il.com>
To: ludovic.desroches@...rochip.com, ulf.hansson@...aro.org,
manuel.lauss@...il.com, mirq-linux@...e.qmqm.pl,
jh80.chung@...sung.com, oakad@...oo.com,
yamada.masahiro@...ionext.com, brucechang@....com.tw,
HaraldWelte@...tech.com
Cc: keescook@...omium.org, inux-mmc@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-omap@...r.kernel.org, Allen Pais <allen.lkml@...il.com>,
Romain Perier <romain.perier@...il.com>
Subject: [PATCH 03/10] mmc: cb710: convert tasklets to use new tasklet_setup() API
In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.
Signed-off-by: Romain Perier <romain.perier@...il.com>
Signed-off-by: Allen Pais <allen.lkml@...il.com>
---
drivers/mmc/host/cb710-mmc.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/mmc/host/cb710-mmc.c b/drivers/mmc/host/cb710-mmc.c
index e84ed84ea4cc..3e8fd2850794 100644
--- a/drivers/mmc/host/cb710-mmc.c
+++ b/drivers/mmc/host/cb710-mmc.c
@@ -646,11 +646,12 @@ static int cb710_mmc_irq_handler(struct cb710_slot *slot)
return 1;
}
-static void cb710_mmc_finish_request_tasklet(unsigned long data)
+static void cb710_mmc_finish_request_tasklet(struct tasklet_struct *t)
{
- struct mmc_host *mmc = (void *)data;
- struct cb710_mmc_reader *reader = mmc_priv(mmc);
+ struct cb710_mmc_reader *reader = from_tasklet(reader, t,
+ finish_req_tasklet);
struct mmc_request *mrq = reader->mrq;
+ struct mmc_host *mmc = mrq->host;
reader->mrq = NULL;
mmc_request_done(mmc, mrq);
@@ -718,8 +719,8 @@ static int cb710_mmc_init(struct platform_device *pdev)
reader = mmc_priv(mmc);
- tasklet_init(&reader->finish_req_tasklet,
- cb710_mmc_finish_request_tasklet, (unsigned long)mmc);
+ tasklet_setup(&reader->finish_req_tasklet,
+ cb710_mmc_finish_request_tasklet);
spin_lock_init(&reader->irq_lock);
cb710_dump_regs(chip, CB710_DUMP_REGS_MMC);
--
2.17.1
Powered by blists - more mailing lists