Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: rx651: Use card->dev in replace of the &pdev->dev argument in the 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>

authored by

Liu Jing and committed by
Mark Brown
4d003b81 9cb86a9c

+6 -6
+6 -6
sound/soc/ti/rx51.c
··· 371 371 372 372 dai_node = of_parse_phandle(np, "nokia,cpu-dai", 0); 373 373 if (!dai_node) { 374 - dev_err(&pdev->dev, "McBSP node is not provided\n"); 374 + dev_err(card->dev, "McBSP node is not provided\n"); 375 375 return -EINVAL; 376 376 } 377 377 rx51_dai[0].cpus->dai_name = NULL; ··· 381 381 382 382 dai_node = of_parse_phandle(np, "nokia,audio-codec", 0); 383 383 if (!dai_node) { 384 - dev_err(&pdev->dev, "Codec node is not provided\n"); 384 + dev_err(card->dev, "Codec node is not provided\n"); 385 385 return -EINVAL; 386 386 } 387 387 rx51_dai[0].codecs->name = NULL; ··· 389 389 390 390 dai_node = of_parse_phandle(np, "nokia,audio-codec", 1); 391 391 if (!dai_node) { 392 - dev_err(&pdev->dev, "Auxiliary Codec node is not provided\n"); 392 + dev_err(card->dev, "Auxiliary Codec node is not provided\n"); 393 393 return -EINVAL; 394 394 } 395 395 rx51_aux_dev[0].dlc.name = NULL; ··· 399 399 400 400 dai_node = of_parse_phandle(np, "nokia,headphone-amplifier", 0); 401 401 if (!dai_node) { 402 - dev_err(&pdev->dev, "Headphone amplifier node is not provided\n"); 402 + dev_err(card->dev, "Headphone amplifier node is not provided\n"); 403 403 return -EINVAL; 404 404 } 405 405 rx51_aux_dev[1].dlc.name = NULL; ··· 408 408 rx51_codec_conf[1].dlc.of_node = dai_node; 409 409 } 410 410 411 - pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); 411 + pdata = devm_kzalloc(card->dev, sizeof(*pdata), GFP_KERNEL); 412 412 if (pdata == NULL) 413 413 return -ENOMEM; 414 414 ··· 439 439 440 440 err = devm_snd_soc_register_card(card->dev, card); 441 441 if (err) { 442 - dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", err); 442 + dev_err(card->dev, "snd_soc_register_card failed (%d)\n", err); 443 443 return err; 444 444 } 445 445