mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Use card->dev in replace of the &pdev->dev argument in the dev_err function
@ 2024-10-15  7:49 Liu Jing
  2024-10-17 12:27 ` Mark Brown
  2024-10-18 20:01 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Liu Jing @ 2024-10-15  7:49 UTC (permalink / raw)
  To: peter.ujfalusi
  Cc: jarkko.nikula, lgirdwood, broonie, perex, tiwai, alsa-devel,
	linux-omap, linux-sound, linux-kernel, Liu Jing

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>
---
 sound/soc/ti/rx51.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/ti/rx51.c b/sound/soc/ti/rx51.c
index 77296237575a..d9900c69e536 100644
--- a/sound/soc/ti/rx51.c
+++ b/sound/soc/ti/rx51.c
@@ -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;
@@ -381,7 +381,7 @@ 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;
@@ -389,7 +389,7 @@ static int rx51_soc_probe(struct platform_device *pdev)
 
 		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;
@@ -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;
@@ -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;
 
@@ -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;
 	}
 
-- 
2.27.0




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Use card->dev in replace of the &pdev->dev argument in the dev_err function
  2024-10-15  7:49 [PATCH] Use card->dev in replace of the &pdev->dev argument in the dev_err function Liu Jing
@ 2024-10-17 12:27 ` Mark Brown
  2024-10-18 20:01 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2024-10-17 12:27 UTC (permalink / raw)
  To: Liu Jing
  Cc: peter.ujfalusi, jarkko.nikula, lgirdwood, perex, tiwai,
	alsa-devel, linux-omap, linux-sound, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 510 bytes --]

On Tue, Oct 15, 2024 at 03:49:38PM +0800, Liu Jing wrote:
> Because card->dev = &pdev->dev is already defined in the rx51_soc_probe function,
> and then &pdev->dev is still used.

Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
There's no need to resubmit to fix this alone.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Use card->dev in replace of the &pdev->dev argument in the dev_err function
  2024-10-15  7:49 [PATCH] Use card->dev in replace of the &pdev->dev argument in the dev_err function Liu Jing
  2024-10-17 12:27 ` Mark Brown
@ 2024-10-18 20:01 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2024-10-18 20:01 UTC (permalink / raw)
  To: peter.ujfalusi, Liu Jing
  Cc: jarkko.nikula, lgirdwood, perex, tiwai, alsa-devel, linux-omap,
	linux-sound, linux-kernel

On Tue, 15 Oct 2024 15:49:38 +0800, Liu Jing wrote:
> Because card->dev = &pdev->dev is already defined in the rx51_soc_probe function,
> and then &pdev->dev is still used.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] Use card->dev in replace of the &pdev->dev argument in the dev_err function
      commit: 4d003b81f46737620c7f9194d305617dfdfce8fb

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-18 20:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-15  7:49 [PATCH] Use card->dev in replace of the &pdev->dev argument in the dev_err function Liu Jing
2024-10-17 12:27 ` Mark Brown
2024-10-18 20:01 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®