From: Fabio Estevam <festevam@gmail.com>
To: ulf.hansson@linaro.org
Cc: shawnguo@kernel.org, linux-imx@nxp.com,
linux-mmc@vger.kernel.org, Fabio Estevam <festevam@gmail.com>
Subject: [PATCH v2 2/2] mmc: sdhci-esdhc-imx: Use device_get_match_data()
Date: Sun, 14 Mar 2021 20:08:24 -0300 [thread overview]
Message-ID: <20210314230824.148969-2-festevam@gmail.com> (raw)
In-Reply-To: <20210314230824.148969-1-festevam@gmail.com>
The retrieval of driver data can be a bit simplified by using
device_get_match_data(), so switch to it.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
Changes since v1:
- None
drivers/mmc/host/sdhci-esdhc-imx.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 2a1fb1cd4433..d309cc620fdc 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -1507,8 +1507,6 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
{
- const struct of_device_id *of_id =
- of_match_device(imx_esdhc_dt_ids, &pdev->dev);
struct sdhci_pltfm_host *pltfm_host;
struct sdhci_host *host;
struct cqhci_host *cq_host;
@@ -1524,7 +1522,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
imx_data = sdhci_pltfm_priv(pltfm_host);
- imx_data->socdata = of_id->data;
+ imx_data->socdata = device_get_match_data(&pdev->dev);
if (imx_data->socdata->flags & ESDHC_FLAG_PMQOS)
cpu_latency_qos_add_request(&imx_data->pm_qos_req, 0);
--
2.25.1
next prev parent reply other threads:[~2021-03-14 23:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-14 23:08 [PATCH v2 1/2] mmc: sdhci-esdhc-imx: Remove non-DT stub Fabio Estevam
2021-03-14 23:08 ` Fabio Estevam [this message]
2021-03-19 14:12 ` [PATCH v2 2/2] mmc: sdhci-esdhc-imx: Use device_get_match_data() Ulf Hansson
2021-03-19 14:12 ` [PATCH v2 1/2] mmc: sdhci-esdhc-imx: Remove non-DT stub Ulf Hansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210314230824.148969-2-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=linux-imx@nxp.com \
--cc=linux-mmc@vger.kernel.org \
--cc=shawnguo@kernel.org \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox