]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
sound: xilinx: pcm: Set the shorter device name
authorHyun Kwon <hyun.kwon@xilinx.com>
Thu, 19 Apr 2018 21:00:21 +0000 (14:00 -0700)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 23 Apr 2018 09:54:22 +0000 (11:54 +0200)
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>
sound/soc/xilinx/xilinx-dp-pcm.c

index 4c2cdfb9d6135fdbd180346540776ebd98df6426..518c1d08aca73971dc9d69bf9371a45e17d40f23 100644 (file)
@@ -46,6 +46,7 @@ static int xilinx_dp_pcm_probe(struct platform_device *pdev)
 {
        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)