Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: mxs-dma: Remove the unused .id_table

The mxs-dma driver is only used by DT platforms and the .id_table
is unused.

Get rid of it to simplify the code.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20201123193051.17285-1-festevam@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Fabio Estevam and committed by
Vinod Koul
cc2afb0d c95e6515

+5 -32
+5 -32
drivers/dma/mxs-dma.c
··· 167 167 } 168 168 }; 169 169 170 - static const struct platform_device_id mxs_dma_ids[] = { 171 - { 172 - .name = "imx23-dma-apbh", 173 - .driver_data = (kernel_ulong_t) &mxs_dma_types[0], 174 - }, { 175 - .name = "imx23-dma-apbx", 176 - .driver_data = (kernel_ulong_t) &mxs_dma_types[1], 177 - }, { 178 - .name = "imx28-dma-apbh", 179 - .driver_data = (kernel_ulong_t) &mxs_dma_types[2], 180 - }, { 181 - .name = "imx28-dma-apbx", 182 - .driver_data = (kernel_ulong_t) &mxs_dma_types[3], 183 - }, { 184 - /* end of list */ 185 - } 186 - }; 187 - 188 170 static const struct of_device_id mxs_dma_dt_ids[] = { 189 - { .compatible = "fsl,imx23-dma-apbh", .data = &mxs_dma_ids[0], }, 190 - { .compatible = "fsl,imx23-dma-apbx", .data = &mxs_dma_ids[1], }, 191 - { .compatible = "fsl,imx28-dma-apbh", .data = &mxs_dma_ids[2], }, 192 - { .compatible = "fsl,imx28-dma-apbx", .data = &mxs_dma_ids[3], }, 171 + { .compatible = "fsl,imx23-dma-apbh", .data = &mxs_dma_types[0], }, 172 + { .compatible = "fsl,imx23-dma-apbx", .data = &mxs_dma_types[1], }, 173 + { .compatible = "fsl,imx28-dma-apbh", .data = &mxs_dma_types[2], }, 174 + { .compatible = "fsl,imx28-dma-apbx", .data = &mxs_dma_types[3], }, 193 175 { /* sentinel */ } 194 176 }; 195 177 MODULE_DEVICE_TABLE(of, mxs_dma_dt_ids); ··· 744 762 static int __init mxs_dma_probe(struct platform_device *pdev) 745 763 { 746 764 struct device_node *np = pdev->dev.of_node; 747 - const struct platform_device_id *id_entry; 748 - const struct of_device_id *of_id; 749 765 const struct mxs_dma_type *dma_type; 750 766 struct mxs_dma_engine *mxs_dma; 751 767 struct resource *iores; ··· 759 779 return ret; 760 780 } 761 781 762 - of_id = of_match_device(mxs_dma_dt_ids, &pdev->dev); 763 - if (of_id) 764 - id_entry = of_id->data; 765 - else 766 - id_entry = platform_get_device_id(pdev); 767 - 768 - dma_type = (struct mxs_dma_type *)id_entry->driver_data; 782 + dma_type = (struct mxs_dma_type *)of_device_get_match_data(&pdev->dev); 769 783 mxs_dma->type = dma_type->type; 770 784 mxs_dma->dev_id = dma_type->id; 771 785 ··· 839 865 .name = "mxs-dma", 840 866 .of_match_table = mxs_dma_dt_ids, 841 867 }, 842 - .id_table = mxs_dma_ids, 843 868 }; 844 869 845 870 static int __init mxs_dma_module_init(void)