diff mbox series

video: fbdev: imxfb: Remove unused .id_table

Message ID 20201124000506.25866-1-festevam@gmail.com
State New
Headers show
Series video: fbdev: imxfb: Remove unused .id_table | expand

Commit Message

Fabio Estevam Nov. 24, 2020, 12:05 a.m. UTC
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 mbox series

Patch

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);