Skip to content

Commit 5ec008b

Browse files
pcercueilinusw
authored andcommitted
pinctrl: ingenic: Remove platform ID table
We enforce devicetree support in the Kconfig and all Ingenic boards without exception probe their drivers from devicetree. The code path to probe the driver from arch code can then be considered as dead code and removed. Signed-off-by: Paul Cercueil <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent 5ab0c8e commit 5ec008b

File tree

1 file changed

+2
-24
lines changed

1 file changed

+2
-24
lines changed

drivers/pinctrl/pinctrl-ingenic.c

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2369,9 +2369,6 @@ static int __init ingenic_pinctrl_probe(struct platform_device *pdev)
23692369
struct ingenic_pinctrl *jzpc;
23702370
struct pinctrl_desc *pctl_desc;
23712371
void __iomem *base;
2372-
const struct platform_device_id *id = platform_get_device_id(pdev);
2373-
const struct of_device_id *of_id = of_match_device(
2374-
ingenic_pinctrl_of_match, dev);
23752372
const struct ingenic_chip_info *chip_info;
23762373
struct device_node *node;
23772374
unsigned int i;
@@ -2394,11 +2391,7 @@ static int __init ingenic_pinctrl_probe(struct platform_device *pdev)
23942391
}
23952392

23962393
jzpc->dev = dev;
2397-
2398-
if (of_id)
2399-
jzpc->version = (enum jz_version)of_id->data;
2400-
else
2401-
jzpc->version = (enum jz_version)id->driver_data;
2394+
jzpc->version = (enum jz_version)of_device_get_match_data(dev);
24022395

24032396
if (jzpc->version >= ID_X1830)
24042397
chip_info = &x1830_chip_info;
@@ -2489,26 +2482,11 @@ static int __init ingenic_pinctrl_probe(struct platform_device *pdev)
24892482
return 0;
24902483
}
24912484

2492-
static const struct platform_device_id ingenic_pinctrl_ids[] = {
2493-
{ "jz4740-pinctrl", ID_JZ4740 },
2494-
{ "jz4725b-pinctrl", ID_JZ4725B },
2495-
{ "jz4760-pinctrl", ID_JZ4760 },
2496-
{ "jz4760b-pinctrl", ID_JZ4760B },
2497-
{ "jz4770-pinctrl", ID_JZ4770 },
2498-
{ "jz4780-pinctrl", ID_JZ4780 },
2499-
{ "x1000-pinctrl", ID_X1000 },
2500-
{ "x1000e-pinctrl", ID_X1000E },
2501-
{ "x1500-pinctrl", ID_X1500 },
2502-
{ "x1830-pinctrl", ID_X1830 },
2503-
{},
2504-
};
2505-
25062485
static struct platform_driver ingenic_pinctrl_driver = {
25072486
.driver = {
25082487
.name = "pinctrl-ingenic",
2509-
.of_match_table = of_match_ptr(ingenic_pinctrl_of_match),
2488+
.of_match_table = ingenic_pinctrl_of_match,
25102489
},
2511-
.id_table = ingenic_pinctrl_ids,
25122490
};
25132491

25142492
static int __init ingenic_pinctrl_drv_register(void)

0 commit comments

Comments
 (0)