Skip to contentSkip to conversation

rtc: mxc: Remove unused .id_table support

PATCH In review Fabio Estevam 2 participants 2 messages Nov 16, 2020

Subsystems (2)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 rtc: mxc: Remove unused .id_table support

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/rtc/rtc-mxc.c | 14 --------------
 1 file changed, 14 deletions(-)
drivers/rtc/rtc-mxc.c +0 -14
index a8cfbde048f4..78d7fba00895 100644
@@ -70,19 +70,6 @@ struct rtc_plat_data {
 	enum imx_rtc_type devtype;
 };
 
-static const struct platform_device_id imx_rtc_devtype[] = {
-	{
-		.name = "imx1-rtc",
-		.driver_data = IMX1_RTC,
-	}, {
-		.name = "imx21-rtc",
-		.driver_data = IMX21_RTC,
-	}, {
-		/* sentinel */
-	}
-};
-MODULE_DEVICE_TABLE(platform, imx_rtc_devtype);
-
 #ifdef CONFIG_OF
 static const struct of_device_id imx_rtc_dt_ids[] = {
 	{ .compatible = "fsl,imx1-rtc", .data = (const void *)IMX1_RTC },
@@ -438,7 +425,6 @@ static struct platform_driver mxc_rtc_driver = {
 		   .name	= "mxc_rtc",
 		   .of_match_table = of_match_ptr(imx_rtc_dt_ids),
 	},
-	.id_table = imx_rtc_devtype,
 	.probe = mxc_rtc_probe,
 };
 
Signature · 1 line
2.17.1
#1 lore raw

Hello,

Quoted 23 lines · Fabio Estevam

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/rtc/rtc-mxc.c | 14 --------------
 1 file changed, 14 deletions(-)
drivers/rtc/rtc-mxc.c +0 -4
index a8cfbde048f4..78d7fba00895 100644
@@ -70,19 +70,6 @@ struct rtc_plat_data {
 	enum imx_rtc_type devtype;
 };
 
-static const struct platform_device_id imx_rtc_devtype[] = {
-	{
-		.name = "imx1-rtc",
-		.driver_data = IMX1_RTC,

drivers/rtc/rtc-mxc.c struct rtc_plat_data { · line 73

Quoted 10 lines
drivers/rtc/rtc-mxc.c +0 -9
-	}, {
-		.name = "imx21-rtc",
-		.driver_data = IMX21_RTC,
-	}, {
-		/* sentinel */
-	}
-};
-MODULE_DEVICE_TABLE(platform, imx_rtc_devtype);
-
 #ifdef CONFIG_OF

Is this #ifdef still necessary?

Quoted 13 lines
drivers/rtc/rtc-mxc.c +0 -1
 static const struct of_device_id imx_rtc_dt_ids[] = {
 	{ .compatible = "fsl,imx1-rtc", .data = (const void *)IMX1_RTC },
@@ -438,7 +425,6 @@ static struct platform_driver mxc_rtc_driver = {
 		   .name	= "mxc_rtc",
 		   .of_match_table = of_match_ptr(imx_rtc_dt_ids),
 	},
-	.id_table = imx_rtc_devtype,
 	.probe = mxc_rtc_probe,
 };
 
Signature · 1 line
2.17.1
Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com