ASoC: ux500: preparation for Card capsuling

Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> says:

I will post Card capsuling patch.
To makes its review easy, tidyup its drivers to reduce
un-related diff as preparation.
No functional change, but is preparation for cleanup driver.

Link: https://patch.msgid.link/87fr1di08n.wl-kuninori.morimoto.gx@renesas.com
This commit is contained in:
Mark Brown 2026-07-30 00:22:29 +01:00
commit 62d0a0bd67
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
2 changed files with 7 additions and 7 deletions

View File

@ -68,10 +68,11 @@ static void mop500_of_node_put(void)
of_node_put(mop500_dai_links[0].codecs->of_node);
}
static int mop500_of_probe(struct platform_device *pdev,
struct device_node *np)
static int mop500_of_probe(struct snd_soc_card *card)
{
struct device *dev = card->dev;
struct device_node *codec_np, *msp_np[2];
struct device_node *np = dev->of_node;
int i;
msp_np[0] = of_parse_phandle(np, "stericsson,cpu-dai", 0);
@ -79,7 +80,7 @@ static int mop500_of_probe(struct platform_device *pdev,
codec_np = of_parse_phandle(np, "stericsson,audio-codec", 0);
if (!(msp_np[0] && msp_np[1] && codec_np)) {
dev_err(&pdev->dev, "Phandle missing or invalid\n");
dev_err(dev, "Phandle missing or invalid\n");
for (i = 0; i < 2; i++)
of_node_put(msp_np[i]);
of_node_put(codec_np);
@ -95,21 +96,20 @@ static int mop500_of_probe(struct platform_device *pdev,
mop500_dai_links[i].codecs->name = NULL;
}
snd_soc_of_parse_card_name(&mop500_card, "stericsson,card-name");
snd_soc_of_parse_card_name(card, "stericsson,card-name");
return 0;
}
static int mop500_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
int ret;
dev_dbg(&pdev->dev, "%s: Enter.\n", __func__);
mop500_card.dev = &pdev->dev;
ret = mop500_of_probe(pdev, np);
ret = mop500_of_probe(&mop500_card);
if (ret)
return ret;

View File

@ -433,5 +433,5 @@ void mop500_ab8500_remove(struct snd_soc_card *card)
clk_put(drvdata->clk_ptr_ulpclk);
clk_put(drvdata->clk_ptr_intclk);
snd_soc_card_set_drvdata(card, drvdata);
snd_soc_card_set_drvdata(card, NULL);
}