Skip to contentSkip to conversation

video: fbdev: imxfb: Remove unused .id_table

PATCH New Fabio Estevam 1 participant 1 message Nov 24, 2020

Subsystems (3)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 video: fbdev: imxfb: Remove unused .id_table

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.

---
 drivers/video/fbdev/imxfb.c | 25 +++----------------------
 1 file changed, 3 insertions(+), 22 deletions(-)
drivers/video/fbdev/imxfb.c +3 -22
index 884b16efa7e8..c10f82f4172b 100644
@@ -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);
 
Signature · 1 line
2.17.1