* [PATCH] mmc: mxs: Remove the unused .id_table
@ 2020-11-23 19:19 Fabio Estevam
2020-11-24 14:25 ` Ulf Hansson
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2020-11-23 19:19 UTC (permalink / raw)
To: ulf.hansson; +Cc: kernel, linux-mmc, Fabio Estevam
The mxs-mmc driver is only used by DT platforms and the .id_table
is unused.
Get rid of it to simplify the code.
While at it, use of_device_get_match_data() to retrieve the driver
data.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
drivers/mmc/host/mxs-mmc.c | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
index 75007f61df97..56bbc6cd9c84 100644
--- a/drivers/mmc/host/mxs-mmc.c
+++ b/drivers/mmc/host/mxs-mmc.c
@@ -545,19 +545,6 @@ static const struct mmc_host_ops mxs_mmc_ops = {
.enable_sdio_irq = mxs_mmc_enable_sdio_irq,
};
-static const struct platform_device_id mxs_ssp_ids[] = {
- {
- .name = "imx23-mmc",
- .driver_data = IMX23_SSP,
- }, {
- .name = "imx28-mmc",
- .driver_data = IMX28_SSP,
- }, {
- /* sentinel */
- }
-};
-MODULE_DEVICE_TABLE(platform, mxs_ssp_ids);
-
static const struct of_device_id mxs_mmc_dt_ids[] = {
{ .compatible = "fsl,imx23-mmc", .data = (void *) IMX23_SSP, },
{ .compatible = "fsl,imx28-mmc", .data = (void *) IMX28_SSP, },
@@ -567,8 +554,6 @@ MODULE_DEVICE_TABLE(of, mxs_mmc_dt_ids);
static int mxs_mmc_probe(struct platform_device *pdev)
{
- const struct of_device_id *of_id =
- of_match_device(mxs_mmc_dt_ids, &pdev->dev);
struct device_node *np = pdev->dev.of_node;
struct mxs_mmc_host *host;
struct mmc_host *mmc;
@@ -593,7 +578,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
goto out_mmc_free;
}
- ssp->devid = (enum mxs_ssp_id) of_id->data;
+ ssp->devid = (enum mxs_ssp_id)of_device_get_match_data(&pdev->dev);
host->mmc = mmc;
host->sdio_irq_en = 0;
@@ -723,7 +708,6 @@ static SIMPLE_DEV_PM_OPS(mxs_mmc_pm_ops, mxs_mmc_suspend, mxs_mmc_resume);
static struct platform_driver mxs_mmc_driver = {
.probe = mxs_mmc_probe,
.remove = mxs_mmc_remove,
- .id_table = mxs_ssp_ids,
.driver = {
.name = DRIVER_NAME,
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mmc: mxs: Remove the unused .id_table
2020-11-23 19:19 [PATCH] mmc: mxs: Remove the unused .id_table Fabio Estevam
@ 2020-11-24 14:25 ` Ulf Hansson
0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2020-11-24 14:25 UTC (permalink / raw)
To: Fabio Estevam; +Cc: Sascha Hauer, linux-mmc@vger.kernel.org
On Mon, 23 Nov 2020 at 20:26, Fabio Estevam <festevam@gmail.com> wrote:
>
> The mxs-mmc driver is only used by DT platforms and the .id_table
> is unused.
>
> Get rid of it to simplify the code.
>
> While at it, use of_device_get_match_data() to retrieve the driver
> data.
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
Applied for next, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/mxs-mmc.c | 18 +-----------------
> 1 file changed, 1 insertion(+), 17 deletions(-)
>
> diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
> index 75007f61df97..56bbc6cd9c84 100644
> --- a/drivers/mmc/host/mxs-mmc.c
> +++ b/drivers/mmc/host/mxs-mmc.c
> @@ -545,19 +545,6 @@ static const struct mmc_host_ops mxs_mmc_ops = {
> .enable_sdio_irq = mxs_mmc_enable_sdio_irq,
> };
>
> -static const struct platform_device_id mxs_ssp_ids[] = {
> - {
> - .name = "imx23-mmc",
> - .driver_data = IMX23_SSP,
> - }, {
> - .name = "imx28-mmc",
> - .driver_data = IMX28_SSP,
> - }, {
> - /* sentinel */
> - }
> -};
> -MODULE_DEVICE_TABLE(platform, mxs_ssp_ids);
> -
> static const struct of_device_id mxs_mmc_dt_ids[] = {
> { .compatible = "fsl,imx23-mmc", .data = (void *) IMX23_SSP, },
> { .compatible = "fsl,imx28-mmc", .data = (void *) IMX28_SSP, },
> @@ -567,8 +554,6 @@ MODULE_DEVICE_TABLE(of, mxs_mmc_dt_ids);
>
> static int mxs_mmc_probe(struct platform_device *pdev)
> {
> - const struct of_device_id *of_id =
> - of_match_device(mxs_mmc_dt_ids, &pdev->dev);
> struct device_node *np = pdev->dev.of_node;
> struct mxs_mmc_host *host;
> struct mmc_host *mmc;
> @@ -593,7 +578,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
> goto out_mmc_free;
> }
>
> - ssp->devid = (enum mxs_ssp_id) of_id->data;
> + ssp->devid = (enum mxs_ssp_id)of_device_get_match_data(&pdev->dev);
>
> host->mmc = mmc;
> host->sdio_irq_en = 0;
> @@ -723,7 +708,6 @@ static SIMPLE_DEV_PM_OPS(mxs_mmc_pm_ops, mxs_mmc_suspend, mxs_mmc_resume);
> static struct platform_driver mxs_mmc_driver = {
> .probe = mxs_mmc_probe,
> .remove = mxs_mmc_remove,
> - .id_table = mxs_ssp_ids,
> .driver = {
> .name = DRIVER_NAME,
> .probe_type = PROBE_PREFER_ASYNCHRONOUS,
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-24 14:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-23 19:19 [PATCH] mmc: mxs: Remove the unused .id_table Fabio Estevam
2020-11-24 14:25 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox