drm/rockchip: dw-dp: register audio codec when dp port enable

Change-Id: I310c512fa388f7303da16b30be1d7a07dfe17081
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
This commit is contained in:
Zhang Yubing
2024-04-08 15:57:44 +08:00
committed by Tao Huang
parent d3a35aa83c
commit fcc32041a4

View File

@@ -5208,6 +5208,9 @@ static int dw_dp_get_port_node(struct dw_dp *dp)
dp->mst_enc[i].port_node = port_node;
}
if (!of_device_is_available(dp->mst_enc[0].port_node))
return -EINVAL;
return 0;
}
@@ -5267,6 +5270,9 @@ static int dw_dp_audio_init(struct dw_dp *dp)
dp->mst_enc[0].audio = audio;
for (i = 1; i < dp->mst_port_num; i++) {
if (!of_device_is_available(dp->mst_enc[i].port_node))
continue;
audio = devm_kzalloc(dp->dev, sizeof(*audio), GFP_KERNEL);
if (!audio)
return -ENOMEM;