By default, the device names derive from the dt description. The DP
pcm devices are represented as a child node of DP node, which results
in both parent and child node names in the device name. The name
created in this way gets too long to fit into the sound component name,
and last characters where IDs are located are not included. This gives
the same component name for two different components, and the debugfs
fails to create entries with same name as warning below:
xilinx-dp-snd-pcm
fd4a0000.zynqmp-display:zynqmp_dp_snd_pcm1: ASoC: Failed to create component debugfs directory
This fixes it by setting the child node name as a device name.
Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satishna@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
{
int ret;
+ dev_set_name(&pdev->dev, pdev->dev.of_node->name);
ret = devm_snd_dmaengine_pcm_register(&pdev->dev,
&xilinx_dmaengine_pcm_config, 0);
if (ret)