linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: b.zolnierkie@samsung.com
Cc: linux-fbdev@vger.kernel.org, kernel@pengutronix.de,
	Fabio Estevam <festevam@gmail.com>
Subject: [PATCH] video: fbdev: imxfb: Remove unused .id_table
Date: Mon, 23 Nov 2020 21:05:06 -0300	[thread overview]
Message-ID: <20201124000506.25866-1-festevam@gmail.com> (raw)

Since 5.10-rc1 i.MX is a devicetree-only platform and the existing
.id_table support in this driver was only useful for old non-devicetree
platforms.

Get rid of the .id_table since it is no longer used.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 drivers/video/fbdev/imxfb.c | 25 +++----------------------
 1 file changed, 3 insertions(+), 22 deletions(-)

diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
index 884b16efa7e8..c10f82f4172b 100644
--- a/drivers/video/fbdev/imxfb.c
+++ b/drivers/video/fbdev/imxfb.c
@@ -175,26 +175,13 @@ struct imxfb_info {
 	int			lcd_pwr_enabled;
 };
 
-static const struct platform_device_id imxfb_devtype[] = {
-	{
-		.name = "imx1-fb",
-		.driver_data = IMX1_FB,
-	}, {
-		.name = "imx21-fb",
-		.driver_data = IMX21_FB,
-	}, {
-		/* sentinel */
-	}
-};
-MODULE_DEVICE_TABLE(platform, imxfb_devtype);
-
 static const struct of_device_id imxfb_of_dev_id[] = {
 	{
 		.compatible = "fsl,imx1-fb",
-		.data = &imxfb_devtype[IMX1_FB],
+		.data = (void *)IMX1_FB,
 	}, {
 		.compatible = "fsl,imx21-fb",
-		.data = &imxfb_devtype[IMX21_FB],
+		.data = (void *)IMX21_FB,
 	}, {
 		/* sentinel */
 	}
@@ -669,7 +656,7 @@ static int imxfb_init_fbinfo(struct platform_device *pdev)
 
 	memset(fbi, 0, sizeof(struct imxfb_info));
 
-	fbi->devtype = pdev->id_entry->driver_data;
+	fbi->devtype = (enum imxfb_type)of_device_get_match_data(&pdev->dev);
 
 	strlcpy(info->fix.id, IMX_NAME, sizeof(info->fix.id));
 
@@ -866,7 +853,6 @@ static int imxfb_probe(struct platform_device *pdev)
 	struct imx_fb_platform_data *pdata;
 	struct resource *res;
 	struct imx_fb_videomode *m;
-	const struct of_device_id *of_id;
 	int ret, i;
 	int bytes_per_pixel;
 
@@ -876,10 +862,6 @@ static int imxfb_probe(struct platform_device *pdev)
 	if (ret < 0)
 		return ret;
 
-	of_id = of_match_device(imxfb_of_dev_id, &pdev->dev);
-	if (of_id)
-		pdev->id_entry = of_id->data;
-
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	if (!res)
 		return -ENODEV;
@@ -1131,7 +1113,6 @@ static struct platform_driver imxfb_driver = {
 	},
 	.probe		= imxfb_probe,
 	.remove		= imxfb_remove,
-	.id_table	= imxfb_devtype,
 };
 module_platform_driver(imxfb_driver);
 
-- 
2.17.1


                 reply	other threads:[~2020-11-24  0:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20201124000506.25866-1-festevam@gmail.com \
    --to=festevam@gmail.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-fbdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).