Commit 274bc856 authored by AngeloGioacchino Del Regno's avatar AngeloGioacchino Del Regno Committed by Stephen Boyd

clk: mediatek: mt2712: Change to use module_platform_driver macro

Now that all of the clocks in clk-mt2712.c are using the common
mtk_clk_simple_{probe,remove}() callbacks we can safely migrate
to module_platform_driver.
While at it, also drop all references to `simple` in the specific
context of mt2712 as that was used in the past only to allow us
to have two platform_driver(s) in one file.
Signed-off-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: default avatarChen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20230306140543.1813621-11-angelogioacchino.delregno@collabora.comSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent c6368ce8
...@@ -1020,7 +1020,7 @@ static const struct mtk_clk_desc peri_desc = { ...@@ -1020,7 +1020,7 @@ static const struct mtk_clk_desc peri_desc = {
.rst_desc = &clk_rst_desc[1], .rst_desc = &clk_rst_desc[1],
}; };
static const struct of_device_id of_match_clk_mt2712_simple[] = { static const struct of_device_id of_match_clk_mt2712[] = {
{ .compatible = "mediatek,mt2712-infracfg", .data = &infra_desc }, { .compatible = "mediatek,mt2712-infracfg", .data = &infra_desc },
{ .compatible = "mediatek,mt2712-mcucfg", .data = &mcu_desc }, { .compatible = "mediatek,mt2712-mcucfg", .data = &mcu_desc },
{ .compatible = "mediatek,mt2712-pericfg", .data = &peri_desc, }, { .compatible = "mediatek,mt2712-pericfg", .data = &peri_desc, },
...@@ -1028,18 +1028,12 @@ static const struct of_device_id of_match_clk_mt2712_simple[] = { ...@@ -1028,18 +1028,12 @@ static const struct of_device_id of_match_clk_mt2712_simple[] = {
{ /* sentinel */ } { /* sentinel */ }
}; };
static struct platform_driver clk_mt2712_simple_drv = { static struct platform_driver clk_mt2712_drv = {
.probe = mtk_clk_simple_probe, .probe = mtk_clk_simple_probe,
.remove = mtk_clk_simple_remove, .remove = mtk_clk_simple_remove,
.driver = { .driver = {
.name = "clk-mt2712-simple", .name = "clk-mt2712",
.of_match_table = of_match_clk_mt2712_simple, .of_match_table = of_match_clk_mt2712,
}, },
}; };
module_platform_driver(clk_mt2712_drv);
static int __init clk_mt2712_init(void)
{
return platform_driver_register(&clk_mt2712_simple_drv);
}
arch_initcall(clk_mt2712_init);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment