summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Reichel <sebastian.reichel@collabora.com>2026-02-03 17:46:24 +0100
committerMark Brown <broonie@kernel.org>2026-02-05 18:46:41 +0000
commit45df1f66b99340e1d6e90501f1e938400a3e9768 (patch)
tree1817ad9cb6f1826ab630561cb1fa9c527dc798f2
parent27b5096ef0f3a78441128b993f0353a77f2f5f53 (diff)
ASoC: rockchip: spdif: Move DT compatible table
Move rk_spdif_match DT compatible table to the usual place before the platform-driver struct definition and drop the useless of_match_ptr(), since it is fine to reference the DT id table even when OF support is disabled (which makes the driver useless anyways). Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Link: https://patch.msgid.link/20260203-rockchip-spdif-cleanup-and-bsp-sync-v2-2-4412016cf577@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/rockchip/rockchip_spdif.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/sound/soc/rockchip/rockchip_spdif.c b/sound/soc/rockchip/rockchip_spdif.c
index 23f14274a6e0..331a23d5173f 100644
--- a/sound/soc/rockchip/rockchip_spdif.c
+++ b/sound/soc/rockchip/rockchip_spdif.c
@@ -40,29 +40,6 @@ struct rk_spdif_dev {
struct regmap *regmap;
};
-static const struct of_device_id rk_spdif_match[] __maybe_unused = {
- { .compatible = "rockchip,rk3066-spdif",
- .data = (void *)RK_SPDIF_RK3066 },
- { .compatible = "rockchip,rk3188-spdif",
- .data = (void *)RK_SPDIF_RK3188 },
- { .compatible = "rockchip,rk3228-spdif",
- .data = (void *)RK_SPDIF_RK3366 },
- { .compatible = "rockchip,rk3288-spdif",
- .data = (void *)RK_SPDIF_RK3288 },
- { .compatible = "rockchip,rk3328-spdif",
- .data = (void *)RK_SPDIF_RK3366 },
- { .compatible = "rockchip,rk3366-spdif",
- .data = (void *)RK_SPDIF_RK3366 },
- { .compatible = "rockchip,rk3368-spdif",
- .data = (void *)RK_SPDIF_RK3366 },
- { .compatible = "rockchip,rk3399-spdif",
- .data = (void *)RK_SPDIF_RK3366 },
- { .compatible = "rockchip,rk3568-spdif",
- .data = (void *)RK_SPDIF_RK3366 },
- {},
-};
-MODULE_DEVICE_TABLE(of, rk_spdif_match);
-
static int rk_spdif_runtime_suspend(struct device *dev)
{
struct rk_spdif_dev *spdif = dev_get_drvdata(dev);
@@ -377,12 +354,35 @@ static const struct dev_pm_ops rk_spdif_pm_ops = {
RUNTIME_PM_OPS(rk_spdif_runtime_suspend, rk_spdif_runtime_resume, NULL)
};
+static const struct of_device_id rk_spdif_match[] = {
+ { .compatible = "rockchip,rk3066-spdif",
+ .data = (void *)RK_SPDIF_RK3066 },
+ { .compatible = "rockchip,rk3188-spdif",
+ .data = (void *)RK_SPDIF_RK3188 },
+ { .compatible = "rockchip,rk3228-spdif",
+ .data = (void *)RK_SPDIF_RK3366 },
+ { .compatible = "rockchip,rk3288-spdif",
+ .data = (void *)RK_SPDIF_RK3288 },
+ { .compatible = "rockchip,rk3328-spdif",
+ .data = (void *)RK_SPDIF_RK3366 },
+ { .compatible = "rockchip,rk3366-spdif",
+ .data = (void *)RK_SPDIF_RK3366 },
+ { .compatible = "rockchip,rk3368-spdif",
+ .data = (void *)RK_SPDIF_RK3366 },
+ { .compatible = "rockchip,rk3399-spdif",
+ .data = (void *)RK_SPDIF_RK3366 },
+ { .compatible = "rockchip,rk3568-spdif",
+ .data = (void *)RK_SPDIF_RK3366 },
+ {},
+};
+MODULE_DEVICE_TABLE(of, rk_spdif_match);
+
static struct platform_driver rk_spdif_driver = {
.probe = rk_spdif_probe,
.remove = rk_spdif_remove,
.driver = {
.name = "rockchip-spdif",
- .of_match_table = of_match_ptr(rk_spdif_match),
+ .of_match_table = rk_spdif_match,
.pm = pm_ptr(&rk_spdif_pm_ops),
},
};