@@ -70,27 +70,12 @@ struct rtc_plat_data {
70
70
enum imx_rtc_type devtype ;
71
71
};
72
72
73
- static const struct platform_device_id imx_rtc_devtype [] = {
74
- {
75
- .name = "imx1-rtc" ,
76
- .driver_data = IMX1_RTC ,
77
- }, {
78
- .name = "imx21-rtc" ,
79
- .driver_data = IMX21_RTC ,
80
- }, {
81
- /* sentinel */
82
- }
83
- };
84
- MODULE_DEVICE_TABLE (platform , imx_rtc_devtype );
85
-
86
- #ifdef CONFIG_OF
87
73
static const struct of_device_id imx_rtc_dt_ids [] = {
88
74
{ .compatible = "fsl,imx1-rtc" , .data = (const void * )IMX1_RTC },
89
75
{ .compatible = "fsl,imx21-rtc" , .data = (const void * )IMX21_RTC },
90
76
{}
91
77
};
92
78
MODULE_DEVICE_TABLE (of , imx_rtc_dt_ids );
93
- #endif
94
79
95
80
static inline int is_imx1_rtc (struct rtc_plat_data * data )
96
81
{
@@ -329,10 +314,7 @@ static int mxc_rtc_probe(struct platform_device *pdev)
329
314
return - ENOMEM ;
330
315
331
316
of_id = of_match_device (imx_rtc_dt_ids , & pdev -> dev );
332
- if (of_id )
333
- pdata -> devtype = (enum imx_rtc_type )of_id -> data ;
334
- else
335
- pdata -> devtype = pdev -> id_entry -> driver_data ;
317
+ pdata -> devtype = (enum imx_rtc_type )of_id -> data ;
336
318
337
319
pdata -> ioaddr = devm_platform_ioremap_resource (pdev , 0 );
338
320
if (IS_ERR (pdata -> ioaddr ))
@@ -438,7 +420,6 @@ static struct platform_driver mxc_rtc_driver = {
438
420
.name = "mxc_rtc" ,
439
421
.of_match_table = of_match_ptr (imx_rtc_dt_ids ),
440
422
},
441
- .id_table = imx_rtc_devtype ,
442
423
.probe = mxc_rtc_probe ,
443
424
};
444
425
0 commit comments