Skip to content

Commit

Permalink
ASoC: rx651: Use card->dev in replace of the &pdev->dev argument in t…
Browse files Browse the repository at this point in the history
…he dev_err function

Because card->dev = &pdev->dev is already defined in the rx51_soc_probe
function, and then &pdev->dev is still used.

Signed-off-by: Liu Jing <liujing@cmss.chinamobile.com>
Link: https://patch.msgid.link/20241015074938.6247-1-liujing@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Liu Jing authored and Mark Brown committed Oct 18, 2024
1 parent 9cb86a9 commit 4d003b8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sound/soc/ti/rx51.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ static int rx51_soc_probe(struct platform_device *pdev)

dai_node = of_parse_phandle(np, "nokia,cpu-dai", 0);
if (!dai_node) {
dev_err(&pdev->dev, "McBSP node is not provided\n");
dev_err(card->dev, "McBSP node is not provided\n");
return -EINVAL;
}
rx51_dai[0].cpus->dai_name = NULL;
Expand All @@ -381,15 +381,15 @@ static int rx51_soc_probe(struct platform_device *pdev)

dai_node = of_parse_phandle(np, "nokia,audio-codec", 0);
if (!dai_node) {
dev_err(&pdev->dev, "Codec node is not provided\n");
dev_err(card->dev, "Codec node is not provided\n");
return -EINVAL;
}
rx51_dai[0].codecs->name = NULL;
rx51_dai[0].codecs->of_node = dai_node;

dai_node = of_parse_phandle(np, "nokia,audio-codec", 1);
if (!dai_node) {
dev_err(&pdev->dev, "Auxiliary Codec node is not provided\n");
dev_err(card->dev, "Auxiliary Codec node is not provided\n");
return -EINVAL;
}
rx51_aux_dev[0].dlc.name = NULL;
Expand All @@ -399,7 +399,7 @@ static int rx51_soc_probe(struct platform_device *pdev)

dai_node = of_parse_phandle(np, "nokia,headphone-amplifier", 0);
if (!dai_node) {
dev_err(&pdev->dev, "Headphone amplifier node is not provided\n");
dev_err(card->dev, "Headphone amplifier node is not provided\n");
return -EINVAL;
}
rx51_aux_dev[1].dlc.name = NULL;
Expand All @@ -408,7 +408,7 @@ static int rx51_soc_probe(struct platform_device *pdev)
rx51_codec_conf[1].dlc.of_node = dai_node;
}

pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
pdata = devm_kzalloc(card->dev, sizeof(*pdata), GFP_KERNEL);
if (pdata == NULL)
return -ENOMEM;

Expand Down Expand Up @@ -439,7 +439,7 @@ static int rx51_soc_probe(struct platform_device *pdev)

err = devm_snd_soc_register_card(card->dev, card);
if (err) {
dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", err);
dev_err(card->dev, "snd_soc_register_card failed (%d)\n", err);
return err;
}

Expand Down

0 comments on commit 4d003b8

Please sign in to comment.