summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-07-29 15:51:21 +0100
committerMark Brown <broonie@kernel.org>2026-07-29 15:51:21 +0100
commit875e906efdc4e68025c97aaa8e258d9e1fc1ba2e (patch)
tree9955b49544c84a1ff8dd7634d9f4dfd71ed3740a
parent6d291d687d48929c195d40a47aa14b9091b32ba6 (diff)
parent3596abbd7bb34d159069511663962be18c191ee5 (diff)
downloadlinux-next-875e906efdc4e68025c97aaa8e258d9e1fc1ba2e.tar.gz
linux-next-875e906efdc4e68025c97aaa8e258d9e1fc1ba2e.zip
ASoC: ti: 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/87ldb5i0do.wl-kuninori.morimoto.gx@renesas.com
-rw-r--r--sound/soc/ti/ams-delta.c4
-rw-r--r--sound/soc/ti/omap-hdmi.c3
-rw-r--r--sound/soc/ti/rx51.c31
3 files changed, 18 insertions, 20 deletions
diff --git a/sound/soc/ti/ams-delta.c b/sound/soc/ti/ams-delta.c
index 2759b39c4ebe..b4f6be2ab4c8 100644
--- a/sound/soc/ti/ams-delta.c
+++ b/sound/soc/ti/ams-delta.c
@@ -562,12 +562,12 @@ static int ams_delta_probe(struct platform_device *pdev)
card->dev = &pdev->dev;
- handset_mute = devm_gpiod_get(card->dev, "handset_mute",
+ handset_mute = devm_gpiod_get(&pdev->dev, "handset_mute",
GPIOD_OUT_HIGH);
if (IS_ERR(handset_mute))
return PTR_ERR(handset_mute);
- handsfree_mute = devm_gpiod_get(card->dev, "handsfree_mute",
+ handsfree_mute = devm_gpiod_get(&pdev->dev, "handsfree_mute",
GPIOD_OUT_HIGH);
if (IS_ERR(handsfree_mute))
return PTR_ERR(handsfree_mute);
diff --git a/sound/soc/ti/omap-hdmi.c b/sound/soc/ti/omap-hdmi.c
index 1e3a9711e70c..c3034a8979dd 100644
--- a/sound/soc/ti/omap-hdmi.c
+++ b/sound/soc/ti/omap-hdmi.c
@@ -24,8 +24,6 @@
#define DRV_NAME "omap-hdmi-audio"
struct hdmi_audio_data {
- struct snd_soc_card *card;
-
const struct omap_hdmi_audio_ops *ops;
struct device *dssdev;
struct snd_dmaengine_dai_dma_data dma_data;
@@ -378,7 +376,6 @@ static int omap_hdmi_audio_probe(struct platform_device *pdev)
if (ret)
return dev_err_probe(dev, ret, "snd_soc_register_card() failed\n");
- ad->card = card;
snd_soc_card_set_drvdata(card, ad);
dev_set_drvdata(dev, ad);
diff --git a/sound/soc/ti/rx51.c b/sound/soc/ti/rx51.c
index b13faf162c75..b4b26cb0cac5 100644
--- a/sound/soc/ti/rx51.c
+++ b/sound/soc/ti/rx51.c
@@ -358,21 +358,22 @@ static struct snd_soc_card rx51_sound_card = {
static int rx51_soc_probe(struct platform_device *pdev)
{
struct rx51_audio_pdata *pdata;
- struct device_node *np = pdev->dev.of_node;
+ struct device *dev = &pdev->dev;
+ struct device_node *np = dev->of_node;
struct snd_soc_card *card = &rx51_sound_card;
int err;
if (!of_machine_is_compatible("nokia,omap3-n900"))
return -ENODEV;
- card->dev = &pdev->dev;
+ card->dev = dev;
if (np) {
struct device_node *dai_node;
dai_node = of_parse_phandle(np, "nokia,cpu-dai", 0);
if (!dai_node) {
- dev_err(card->dev, "McBSP node is not provided\n");
+ dev_err(dev, "McBSP node is not provided\n");
return -EINVAL;
}
rx51_dai[0].cpus->dai_name = NULL;
@@ -382,7 +383,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(card->dev, "Codec node is not provided\n");
+ dev_err(dev, "Codec node is not provided\n");
return -EINVAL;
}
rx51_dai[0].codecs->name = NULL;
@@ -390,7 +391,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(card->dev, "Auxiliary Codec node is not provided\n");
+ dev_err(dev, "Auxiliary Codec node is not provided\n");
return -EINVAL;
}
rx51_aux_dev[0].dlc.name = NULL;
@@ -400,7 +401,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(card->dev, "Headphone amplifier node is not provided\n");
+ dev_err(dev, "Headphone amplifier node is not provided\n");
return -EINVAL;
}
rx51_aux_dev[1].dlc.name = NULL;
@@ -409,35 +410,35 @@ static int rx51_soc_probe(struct platform_device *pdev)
rx51_codec_conf[1].dlc.of_node = dai_node;
}
- pdata = devm_kzalloc(card->dev, sizeof(*pdata), GFP_KERNEL);
+ pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
if (pdata == NULL)
return -ENOMEM;
snd_soc_card_set_drvdata(card, pdata);
- pdata->tvout_selection_gpio = devm_gpiod_get(card->dev,
+ pdata->tvout_selection_gpio = devm_gpiod_get(dev,
"tvout-selection",
GPIOD_OUT_LOW);
if (IS_ERR(pdata->tvout_selection_gpio))
- return dev_err_probe(card->dev, PTR_ERR(pdata->tvout_selection_gpio),
+ return dev_err_probe(dev, PTR_ERR(pdata->tvout_selection_gpio),
"could not get tvout selection gpio\n");
- pdata->eci_sw_gpio = devm_gpiod_get(card->dev, "eci-switch",
+ pdata->eci_sw_gpio = devm_gpiod_get(dev, "eci-switch",
GPIOD_OUT_HIGH);
if (IS_ERR(pdata->eci_sw_gpio))
- return dev_err_probe(card->dev, PTR_ERR(pdata->eci_sw_gpio),
+ return dev_err_probe(dev, PTR_ERR(pdata->eci_sw_gpio),
"could not get eci switch gpio\n");
- pdata->speaker_amp_gpio = devm_gpiod_get(card->dev,
+ pdata->speaker_amp_gpio = devm_gpiod_get(dev,
"speaker-amplifier",
GPIOD_OUT_LOW);
if (IS_ERR(pdata->speaker_amp_gpio))
- return dev_err_probe(card->dev, PTR_ERR(pdata->speaker_amp_gpio),
+ return dev_err_probe(dev, PTR_ERR(pdata->speaker_amp_gpio),
"could not get speaker enable gpio\n");
- err = devm_snd_soc_register_card(card->dev, card);
+ err = devm_snd_soc_register_card(dev, card);
if (err)
- return dev_err_probe(card->dev, err,
+ return dev_err_probe(dev, err,
"snd_soc_register_card() failed\n");
return 0;