ASoC: rockchip: spdif: Use device_get_match_data()

Use device_get_match_data(), so that the probe routine does not
directly reference the of_match_table. This allows moving the
table at the end of the file where most recent drivers have it.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://patch.msgid.link/20260203-rockchip-spdif-cleanup-and-bsp-sync-v2-1-4412016cf577@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Sebastian Reichel 2026-02-03 17:46:23 +01:00 committed by Mark Brown
parent fef1f75615
commit 27b5096ef0
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -283,14 +283,14 @@ static const struct regmap_config rk_spdif_regmap_config = {
static int rk_spdif_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
enum rk_spdif_type spdif_type;
struct rk_spdif_dev *spdif;
const struct of_device_id *match;
struct resource *res;
void __iomem *regs;
int ret;
match = of_match_node(rk_spdif_match, np);
if (match->data == (void *)RK_SPDIF_RK3288) {
spdif_type = (uintptr_t) device_get_match_data(&pdev->dev);
if (spdif_type == RK_SPDIF_RK3288) {
struct regmap *grf;
grf = syscon_regmap_lookup_by_phandle(np, "rockchip,grf");