Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 29 Sep 2019 18:30:15 +0200
From: Romain Perier <>
Cc: Kees Cook <>,
	Romain Perier <>,
	Romain Perier <>
Subject: [PRE-REVIEW PATCH 03/16] mmc: renesas_sdhi: Prepare to use the new tasklet API

From: Romain Perier <>

The future tasklet API will no longer allow to pass an arbitrary
"unsigned long" data parameter. The tasklet data structure will need to
be embedded into a data structure that will be retrieved from the tasklet
handler. Then, all other data structure that must be retrieved from the
handler (by using the tasklet as root object) must be retrievable via
container_of(). This commits adds a field to get the address of the
device binded to this driver, so the corresponding platform_device and
its drvdata can be retrieved from the tasklet handler.

Signed-off-by: Romain Perier <>
 drivers/mmc/host/renesas_sdhi.h      | 1 +
 drivers/mmc/host/renesas_sdhi_core.c | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/drivers/mmc/host/renesas_sdhi.h b/drivers/mmc/host/renesas_sdhi.h
index c0504aa90857..01ef8ff5b525 100644
--- a/drivers/mmc/host/renesas_sdhi.h
+++ b/drivers/mmc/host/renesas_sdhi.h
@@ -42,6 +42,7 @@ struct tmio_mmc_dma {
 struct renesas_sdhi {
+	struct platform_device *pdev;
 	struct clk *clk;
 	struct clk *clk_cd;
 	struct tmio_mmc_data mmc_data;
diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index d4ada5cca2d1..ceb3b0af1470 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -843,6 +843,8 @@ int renesas_sdhi_probe(struct platform_device *pdev,
 		goto eirq;
+	priv->pdev = pdev;
 	dev_info(&pdev->dev, "%s base at 0x%08lx max clock rate %u MHz\n",
 		 mmc_hostname(host->mmc), (unsigned long)
 		 (platform_get_resource(pdev, IORESOURCE_MEM, 0)->start),

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.