[alsa-devel] [PATCH v2 00/10] Remove unnecessary function
When calling the function devm_snd_soc_register_card to register a sound card,the address of snd_soc_card will be assigned to dev->driver_data automatically,so there is no extra need to call platform_set_drvdata.
Peng Donglin (10): ASoC: s3c24xx_uda134x: Remove unnecessary function call ASoC: mediatek: Remove unnecessary function call ASoC: Intel: Remove unnecessary function call ASoC: atmel: Remove unnecessary function call ASoC: rockchip: Remove unnecessary function call ASoC: mxs-sgtl5000: Remove unnecessary function call ASoC: qcom: Remove useless function call ASoC: sun4i-codec: Remove unnecessary function call ASoC: tegra: Remove unnecessary function call ASoC: ux500: Remove unnecessary function call
sound/soc/atmel/atmel-classd.c | 1 - sound/soc/atmel/atmel-pdmic.c | 1 - sound/soc/intel/boards/bytcht_da7213.c | 6 ++---- sound/soc/intel/boards/bytcht_es8316.c | 6 ++---- sound/soc/intel/boards/bytcht_nocodec.c | 6 ++---- sound/soc/intel/boards/bytcr_rt5640.c | 7 ++----- sound/soc/intel/boards/bytcr_rt5651.c | 7 ++----- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 6 ++---- sound/soc/intel/boards/cht_bsw_rt5645.c | 6 ++---- sound/soc/intel/boards/cht_bsw_rt5672.c | 6 ++---- sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c | 1 - sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c | 1 - sound/soc/mediatek/mt8173/mt8173-rt5650.c | 1 - sound/soc/mxs/mxs-sgtl5000.c | 7 ++----- sound/soc/qcom/apq8016_sbc.c | 1 - sound/soc/qcom/storm.c | 1 - sound/soc/rockchip/rk3288_hdmi_analog.c | 6 +----- sound/soc/samsung/s3c24xx_uda134x.c | 1 - sound/soc/sunxi/sun4i-codec.c | 1 - sound/soc/tegra/tegra_alc5632.c | 1 - sound/soc/tegra/tegra_max98090.c | 1 - sound/soc/tegra/tegra_rt5640.c | 1 - sound/soc/tegra/tegra_rt5677.c | 1 - sound/soc/tegra/tegra_sgtl5000.c | 1 - sound/soc/tegra/tegra_wm8753.c | 1 - sound/soc/tegra/tegra_wm8903.c | 1 - sound/soc/tegra/tegra_wm9712.c | 1 - sound/soc/tegra/trimslice.c | 1 - sound/soc/ux500/mop500.c | 1 - 29 files changed, 19 insertions(+), 63 deletions(-)
The work of the function platform_set_drvdata is done by devm_snd_soc_register_card.
Signed-off-by: Peng Donglin dolinux.peng@gmail.com --- sound/soc/samsung/s3c24xx_uda134x.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/sound/soc/samsung/s3c24xx_uda134x.c b/sound/soc/samsung/s3c24xx_uda134x.c index 55538e333cc8..758e46e8061e 100644 --- a/sound/soc/samsung/s3c24xx_uda134x.c +++ b/sound/soc/samsung/s3c24xx_uda134x.c @@ -237,7 +237,6 @@ static int s3c24xx_uda134x_probe(struct platform_device *pdev) mutex_init(&priv->clk_lock);
card->dev = &pdev->dev; - platform_set_drvdata(pdev, card); snd_soc_card_set_drvdata(card, priv);
ret = devm_snd_soc_register_card(&pdev->dev, card);
On Wed, Aug 23, 2017 at 05:17:41AM -0700, Peng Donglin wrote:
The work of the function platform_set_drvdata is done by devm_snd_soc_register_card.
This doens't apply against current code, please check and resend.
The work of the function platform_set_drvdata is done by devm_snd_soc_register_card.
Signed-off-by: Peng Donglin dolinux.peng@gmail.com --- sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c | 1 - sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c | 1 - sound/soc/mediatek/mt8173/mt8173-rt5650.c | 1 - 3 files changed, 3 deletions(-)
diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c index 5e383eb456a4..99c15219dbc8 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c @@ -222,7 +222,6 @@ static int mt8173_rt5650_rt5514_dev_probe(struct platform_device *pdev) mt8173_rt5650_rt5514_codecs[1].of_node;
card->dev = &pdev->dev; - platform_set_drvdata(pdev, card);
ret = devm_snd_soc_register_card(&pdev->dev, card); if (ret) diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c index fed1f15a39c2..42de84ca8c84 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c @@ -279,7 +279,6 @@ static int mt8173_rt5650_rt5676_dev_probe(struct platform_device *pdev) }
card->dev = &pdev->dev; - platform_set_drvdata(pdev, card);
ret = devm_snd_soc_register_card(&pdev->dev, card); if (ret) diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650.c b/sound/soc/mediatek/mt8173/mt8173-rt5650.c index a78470839b65..e69c141d8ed4 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650.c @@ -311,7 +311,6 @@ static int mt8173_rt5650_dev_probe(struct platform_device *pdev) return -EINVAL; } card->dev = &pdev->dev; - platform_set_drvdata(pdev, card);
ret = devm_snd_soc_register_card(&pdev->dev, card); if (ret)
On Wed, Aug 23, 2017 at 05:18:38AM -0700, Peng Donglin wrote:
The work of the function platform_set_drvdata is done by devm_snd_soc_register_card.
This also doesn't apply against current code, it looks like versions of this series have already been sent - please check the entire series and resend anything that's left.
The work of the function platform_set_drvdata is done by devm_snd_soc_register_card.
Signed-off-by: Peng Donglin dolinux.peng@gmail.com ---
Changes in v2: -add missed occurrences.
sound/soc/intel/boards/bytcht_da7213.c | 6 ++---- sound/soc/intel/boards/bytcht_es8316.c | 6 ++---- sound/soc/intel/boards/bytcht_nocodec.c | 6 ++---- sound/soc/intel/boards/bytcr_rt5640.c | 7 ++----- sound/soc/intel/boards/bytcr_rt5651.c | 7 ++----- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 6 ++---- sound/soc/intel/boards/cht_bsw_rt5645.c | 6 ++---- sound/soc/intel/boards/cht_bsw_rt5672.c | 6 ++---- 8 files changed, 16 insertions(+), 34 deletions(-)
diff --git a/sound/soc/intel/boards/bytcht_da7213.c b/sound/soc/intel/boards/bytcht_da7213.c index 18873e23f404..f43ced5288af 100644 --- a/sound/soc/intel/boards/bytcht_da7213.c +++ b/sound/soc/intel/boards/bytcht_da7213.c @@ -260,12 +260,10 @@ static int bytcht_da7213_probe(struct platform_device *pdev) }
ret_val = devm_snd_soc_register_card(&pdev->dev, card); - if (ret_val) { + if (ret_val) dev_err(&pdev->dev, "snd_soc_register_card failed %d\n", ret_val); - return ret_val; - } - platform_set_drvdata(pdev, card); + return ret_val; }
diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c index 52635462dac6..c3213f320869 100644 --- a/sound/soc/intel/boards/bytcht_es8316.c +++ b/sound/soc/intel/boards/bytcht_es8316.c @@ -278,11 +278,9 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev) }
ret = devm_snd_soc_register_card(&pdev->dev, &byt_cht_es8316_card); - if (ret) { + if (ret) dev_err(&pdev->dev, "snd_soc_register_card failed %d\n", ret); - return ret; - } - platform_set_drvdata(pdev, &byt_cht_es8316_card); + return ret; }
diff --git a/sound/soc/intel/boards/bytcht_nocodec.c b/sound/soc/intel/boards/bytcht_nocodec.c index 1dd9441806fa..b9adde0e2a9f 100644 --- a/sound/soc/intel/boards/bytcht_nocodec.c +++ b/sound/soc/intel/boards/bytcht_nocodec.c @@ -185,12 +185,10 @@ static int snd_bytcht_nocodec_mc_probe(struct platform_device *pdev)
ret_val = devm_snd_soc_register_card(&pdev->dev, &bytcht_nocodec_card);
- if (ret_val) { + if (ret_val) dev_err(&pdev->dev, "devm_snd_soc_register_card failed %d\n", ret_val); - return ret_val; - } - platform_set_drvdata(pdev, &bytcht_nocodec_card); + return ret_val; }
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c index 4a76b099a508..9a5775c89393 100644 --- a/sound/soc/intel/boards/bytcr_rt5640.c +++ b/sound/soc/intel/boards/bytcr_rt5640.c @@ -912,13 +912,10 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) }
ret_val = devm_snd_soc_register_card(&pdev->dev, &byt_rt5640_card); - - if (ret_val) { + if (ret_val) dev_err(&pdev->dev, "devm_snd_soc_register_card failed %d\n", ret_val); - return ret_val; - } - platform_set_drvdata(pdev, &byt_rt5640_card); + return ret_val; }
diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c index 4a3516b38c2c..c50a3834d0eb 100644 --- a/sound/soc/intel/boards/bytcr_rt5651.c +++ b/sound/soc/intel/boards/bytcr_rt5651.c @@ -304,13 +304,10 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev) byt_rt5651_card.dev = &pdev->dev;
ret_val = devm_snd_soc_register_card(&pdev->dev, &byt_rt5651_card); - - if (ret_val) { + if (ret_val) dev_err(&pdev->dev, "devm_snd_soc_register_card failed %d\n", ret_val); - return ret_val; - } - platform_set_drvdata(pdev, &byt_rt5651_card); + return ret_val; }
diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c index 20755ecc7f9e..62d45e0badc5 100644 --- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c +++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c @@ -295,12 +295,10 @@ static int snd_cht_mc_probe(struct platform_device *pdev) snd_soc_card_cht.dev = &pdev->dev; snd_soc_card_set_drvdata(&snd_soc_card_cht, drv); ret_val = devm_snd_soc_register_card(&pdev->dev, &snd_soc_card_cht); - if (ret_val) { + if (ret_val) dev_err(&pdev->dev, "snd_soc_register_card failed %d\n", ret_val); - return ret_val; - } - platform_set_drvdata(pdev, &snd_soc_card_cht); + return ret_val; }
diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c index 5bcde01d15e6..511d4d9b24bf 100644 --- a/sound/soc/intel/boards/cht_bsw_rt5645.c +++ b/sound/soc/intel/boards/cht_bsw_rt5645.c @@ -694,12 +694,10 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
snd_soc_card_set_drvdata(card, drv); ret_val = devm_snd_soc_register_card(&pdev->dev, card); - if (ret_val) { + if (ret_val) dev_err(&pdev->dev, "snd_soc_register_card failed %d\n", ret_val); - return ret_val; - } - platform_set_drvdata(pdev, card); + return ret_val; }
diff --git a/sound/soc/intel/boards/cht_bsw_rt5672.c b/sound/soc/intel/boards/cht_bsw_rt5672.c index bc2a52de06a3..656cef7da054 100644 --- a/sound/soc/intel/boards/cht_bsw_rt5672.c +++ b/sound/soc/intel/boards/cht_bsw_rt5672.c @@ -443,12 +443,10 @@ static int snd_cht_mc_probe(struct platform_device *pdev) /* register the soc card */ snd_soc_card_cht.dev = &pdev->dev; ret_val = devm_snd_soc_register_card(&pdev->dev, &snd_soc_card_cht); - if (ret_val) { + if (ret_val) dev_err(&pdev->dev, "snd_soc_register_card failed %d\n", ret_val); - return ret_val; - } - platform_set_drvdata(pdev, &snd_soc_card_cht); + return ret_val; }
Hi Mark,
On Wed, Aug 23, 2017 at 8:19 PM, Peng Donglin dolinux.peng@gmail.com wrote:
The work of the function platform_set_drvdata is done by devm_snd_soc_register_card.
Signed-off-by: Peng Donglin dolinux.peng@gmail.com
Changes in v2: -add missed occurrences.
sound/soc/intel/boards/bytcht_da7213.c | 6 ++---- sound/soc/intel/boards/bytcht_es8316.c | 6 ++---- sound/soc/intel/boards/bytcht_nocodec.c | 6 ++---- sound/soc/intel/boards/bytcr_rt5640.c | 7 ++----- sound/soc/intel/boards/bytcr_rt5651.c | 7 ++----- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 6 ++---- sound/soc/intel/boards/cht_bsw_rt5645.c | 6 ++---- sound/soc/intel/boards/cht_bsw_rt5672.c | 6 ++---- 8 files changed, 16 insertions(+), 34 deletions(-)
I found that this patch had not been applied, perhaps you missed it.
On Mon, Aug 28, 2017 at 10:20:52AM +0800, Donglin Peng wrote:
On Wed, Aug 23, 2017 at 8:19 PM, Peng Donglin dolinux.peng@gmail.com wrote:
I found that this patch had not been applied, perhaps you missed it.
Please don't send content free pings and please allow a reasonable time for review. People get busy, go on holiday, attend conferences and so on so unless there is some reason for urgency (like critical bug fixes) please allow at least a couple of weeks for review. If there have been review comments then people may be waiting for those to be addressed. Sending content free pings just adds to the mail volume (if they are seen at all) and if something has gone wrong you'll have to resend the patches anyway.
The work of the function platform_set_drvdata is done by devm_snd_soc_register_card.
Signed-off-by: Peng Donglin dolinux.peng@gmail.com --- sound/soc/atmel/atmel-classd.c | 1 - sound/soc/atmel/atmel-pdmic.c | 1 - 2 files changed, 2 deletions(-)
diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc/atmel/atmel-classd.c index b7ef8c59b49a..0cd7caaed9c4 100644 --- a/sound/soc/atmel/atmel-classd.c +++ b/sound/soc/atmel/atmel-classd.c @@ -652,7 +652,6 @@ static int atmel_classd_probe(struct platform_device *pdev) }
snd_soc_card_set_drvdata(card, dd); - platform_set_drvdata(pdev, card);
ret = atmel_classd_asoc_card_init(dev, card); if (ret) { diff --git a/sound/soc/atmel/atmel-pdmic.c b/sound/soc/atmel/atmel-pdmic.c index c917df7715d1..8e3d34be9e69 100644 --- a/sound/soc/atmel/atmel-pdmic.c +++ b/sound/soc/atmel/atmel-pdmic.c @@ -694,7 +694,6 @@ static int atmel_pdmic_probe(struct platform_device *pdev) }
snd_soc_card_set_drvdata(card, dd); - platform_set_drvdata(pdev, card);
ret = atmel_pdmic_asoc_card_init(dev, card); if (ret) {
The work of the function platform_set_drvdata is done by devm_snd_soc_register_card.
Signed-off-by: Peng Donglin dolinux.peng@gmail.com --- sound/soc/rockchip/rk3288_hdmi_analog.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/sound/soc/rockchip/rk3288_hdmi_analog.c b/sound/soc/rockchip/rk3288_hdmi_analog.c index dbc53e48c52c..cf5bbd8b6ebc 100644 --- a/sound/soc/rockchip/rk3288_hdmi_analog.c +++ b/sound/soc/rockchip/rk3288_hdmi_analog.c @@ -266,13 +266,9 @@ static int snd_rk_mc_probe(struct platform_device *pdev) ret = devm_snd_soc_register_card(&pdev->dev, card); if (ret == -EPROBE_DEFER) return -EPROBE_DEFER; - if (ret) { + if (ret) dev_err(&pdev->dev, "Soc register card failed %d\n", ret); - return ret; - } - - platform_set_drvdata(pdev, card);
return ret; }
The work of the function platform_set_drvdata is done by devm_snd_soc_register_card.
Signed-off-by: Peng Donglin dolinux.peng@gmail.com --- sound/soc/mxs/mxs-sgtl5000.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/sound/soc/mxs/mxs-sgtl5000.c b/sound/soc/mxs/mxs-sgtl5000.c index a96276e77332..90ca6f9131a1 100644 --- a/sound/soc/mxs/mxs-sgtl5000.c +++ b/sound/soc/mxs/mxs-sgtl5000.c @@ -140,16 +140,13 @@ static int mxs_sgtl5000_probe(struct platform_device *pdev) }
card->dev = &pdev->dev; - platform_set_drvdata(pdev, card);
ret = devm_snd_soc_register_card(&pdev->dev, card); - if (ret) { + if (ret) dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); - return ret; - }
- return 0; + return ret; }
static int mxs_sgtl5000_remove(struct platform_device *pdev)
The work of the function platform_set_drvdata is done by devm_snd_soc_register_card.
Acked-by: Banajit Goswami bgoswami@codeaurora.org Signed-off-by: Peng Donglin dolinux.peng@gmail.com --- sound/soc/qcom/apq8016_sbc.c | 1 - sound/soc/qcom/storm.c | 1 - 2 files changed, 2 deletions(-)
diff --git a/sound/soc/qcom/apq8016_sbc.c b/sound/soc/qcom/apq8016_sbc.c index d084d7468299..52925919267b 100644 --- a/sound/soc/qcom/apq8016_sbc.c +++ b/sound/soc/qcom/apq8016_sbc.c @@ -191,7 +191,6 @@ static int apq8016_sbc_platform_probe(struct platform_device *pdev) if (IS_ERR(data->spkr_iomux)) return PTR_ERR(data->spkr_iomux);
- platform_set_drvdata(pdev, data); snd_soc_card_set_drvdata(card, data);
return devm_snd_soc_register_card(&pdev->dev, card); diff --git a/sound/soc/qcom/storm.c b/sound/soc/qcom/storm.c index c5207af14104..a9fa972466ad 100644 --- a/sound/soc/qcom/storm.c +++ b/sound/soc/qcom/storm.c @@ -99,7 +99,6 @@ static int storm_platform_probe(struct platform_device *pdev) return -ENOMEM;
card->dev = &pdev->dev; - platform_set_drvdata(pdev, card);
ret = snd_soc_of_parse_card_name(card, "qcom,model"); if (ret) {
The work of the function platform_set_drvdata is done by devm_snd_soc_register_card.
Signed-off-by: Peng Donglin dolinux.peng@gmail.com --- sound/soc/sunxi/sun4i-codec.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c index 150069987c0c..82beeae8edc5 100644 --- a/sound/soc/sunxi/sun4i-codec.c +++ b/sound/soc/sunxi/sun4i-codec.c @@ -1655,7 +1655,6 @@ static int sun4i_codec_probe(struct platform_device *pdev) goto err_unregister_codec; }
- platform_set_drvdata(pdev, card); snd_soc_card_set_drvdata(card, scodec);
ret = snd_soc_register_card(card);
The work of the function platform_set_drvdata is done by devm_snd_soc_register_card.
Signed-off-by: Peng Donglin dolinux.peng@gmail.com --- sound/soc/tegra/tegra_alc5632.c | 1 - sound/soc/tegra/tegra_max98090.c | 1 - sound/soc/tegra/tegra_rt5640.c | 1 - sound/soc/tegra/tegra_rt5677.c | 1 - sound/soc/tegra/tegra_sgtl5000.c | 1 - sound/soc/tegra/tegra_wm8753.c | 1 - sound/soc/tegra/tegra_wm8903.c | 1 - sound/soc/tegra/tegra_wm9712.c | 1 - sound/soc/tegra/trimslice.c | 1 - 9 files changed, 9 deletions(-)
diff --git a/sound/soc/tegra/tegra_alc5632.c b/sound/soc/tegra/tegra_alc5632.c index 0509902512cc..053fe4c5ed4c 100644 --- a/sound/soc/tegra/tegra_alc5632.c +++ b/sound/soc/tegra/tegra_alc5632.c @@ -173,7 +173,6 @@ static int tegra_alc5632_probe(struct platform_device *pdev) return -ENOMEM;
card->dev = &pdev->dev; - platform_set_drvdata(pdev, card); snd_soc_card_set_drvdata(card, alc5632);
alc5632->gpio_hp_det = of_get_named_gpio(np, "nvidia,hp-det-gpios", 0); diff --git a/sound/soc/tegra/tegra_max98090.c b/sound/soc/tegra/tegra_max98090.c index c34a54d6e812..41feee9beb12 100644 --- a/sound/soc/tegra/tegra_max98090.c +++ b/sound/soc/tegra/tegra_max98090.c @@ -229,7 +229,6 @@ static int tegra_max98090_probe(struct platform_device *pdev) return -ENOMEM;
card->dev = &pdev->dev; - platform_set_drvdata(pdev, card); snd_soc_card_set_drvdata(card, machine);
machine->gpio_hp_det = of_get_named_gpio(np, "nvidia,hp-det-gpios", 0); diff --git a/sound/soc/tegra/tegra_rt5640.c b/sound/soc/tegra/tegra_rt5640.c index 93a356802345..02f27fe14324 100644 --- a/sound/soc/tegra/tegra_rt5640.c +++ b/sound/soc/tegra/tegra_rt5640.c @@ -174,7 +174,6 @@ static int tegra_rt5640_probe(struct platform_device *pdev) return -ENOMEM;
card->dev = &pdev->dev; - platform_set_drvdata(pdev, card); snd_soc_card_set_drvdata(card, machine);
machine->gpio_hp_det = of_get_named_gpio_flags( diff --git a/sound/soc/tegra/tegra_rt5677.c b/sound/soc/tegra/tegra_rt5677.c index ebf58d0e0f10..3dbf0e1350c1 100644 --- a/sound/soc/tegra/tegra_rt5677.c +++ b/sound/soc/tegra/tegra_rt5677.c @@ -222,7 +222,6 @@ static int tegra_rt5677_probe(struct platform_device *pdev) return -ENOMEM;
card->dev = &pdev->dev; - platform_set_drvdata(pdev, card); snd_soc_card_set_drvdata(card, machine);
machine->gpio_hp_det = of_get_named_gpio(np, "nvidia,hp-det-gpios", 0); diff --git a/sound/soc/tegra/tegra_sgtl5000.c b/sound/soc/tegra/tegra_sgtl5000.c index 6dda01f69983..45a4aa9d2a47 100644 --- a/sound/soc/tegra/tegra_sgtl5000.c +++ b/sound/soc/tegra/tegra_sgtl5000.c @@ -124,7 +124,6 @@ static int tegra_sgtl5000_driver_probe(struct platform_device *pdev) return -ENOMEM;
card->dev = &pdev->dev; - platform_set_drvdata(pdev, card); snd_soc_card_set_drvdata(card, machine);
ret = snd_soc_of_parse_card_name(card, "nvidia,model"); diff --git a/sound/soc/tegra/tegra_wm8753.c b/sound/soc/tegra/tegra_wm8753.c index d0ab0026a4cd..23a810e3bacc 100644 --- a/sound/soc/tegra/tegra_wm8753.c +++ b/sound/soc/tegra/tegra_wm8753.c @@ -132,7 +132,6 @@ static int tegra_wm8753_driver_probe(struct platform_device *pdev) return -ENOMEM;
card->dev = &pdev->dev; - platform_set_drvdata(pdev, card); snd_soc_card_set_drvdata(card, machine);
ret = snd_soc_of_parse_card_name(card, "nvidia,model"); diff --git a/sound/soc/tegra/tegra_wm8903.c b/sound/soc/tegra/tegra_wm8903.c index dbfb49298ae8..d4a4a2be8b42 100644 --- a/sound/soc/tegra/tegra_wm8903.c +++ b/sound/soc/tegra/tegra_wm8903.c @@ -252,7 +252,6 @@ static int tegra_wm8903_driver_probe(struct platform_device *pdev) return -ENOMEM;
card->dev = &pdev->dev; - platform_set_drvdata(pdev, card); snd_soc_card_set_drvdata(card, machine);
machine->gpio_spkr_en = of_get_named_gpio(np, "nvidia,spkr-en-gpios", diff --git a/sound/soc/tegra/tegra_wm9712.c b/sound/soc/tegra/tegra_wm9712.c index c9cd22432627..864a3345972e 100644 --- a/sound/soc/tegra/tegra_wm9712.c +++ b/sound/soc/tegra/tegra_wm9712.c @@ -81,7 +81,6 @@ static int tegra_wm9712_driver_probe(struct platform_device *pdev) return -ENOMEM;
card->dev = &pdev->dev; - platform_set_drvdata(pdev, card); snd_soc_card_set_drvdata(card, machine);
machine->codec = platform_device_alloc("wm9712-codec", -1); diff --git a/sound/soc/tegra/trimslice.c b/sound/soc/tegra/trimslice.c index c9dcad9bb931..99bcdd979eb2 100644 --- a/sound/soc/tegra/trimslice.c +++ b/sound/soc/tegra/trimslice.c @@ -127,7 +127,6 @@ static int tegra_snd_trimslice_probe(struct platform_device *pdev) return -ENOMEM;
card->dev = &pdev->dev; - platform_set_drvdata(pdev, card); snd_soc_card_set_drvdata(card, trimslice);
trimslice_tlv320aic23_dai.codec_of_node = of_parse_phandle(np,
The work of the function platform_set_drvdata is done by devm_snd_soc_register_card.
Signed-off-by: Peng Donglin dolinux.peng@gmail.com --- sound/soc/ux500/mop500.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/sound/soc/ux500/mop500.c b/sound/soc/ux500/mop500.c index ba9fc099cf67..070a6880980e 100644 --- a/sound/soc/ux500/mop500.c +++ b/sound/soc/ux500/mop500.c @@ -115,7 +115,6 @@ static int mop500_probe(struct platform_device *pdev)
dev_dbg(&pdev->dev, "%s: Card %s: Set platform drvdata.\n", __func__, mop500_card.name); - platform_set_drvdata(pdev, &mop500_card);
snd_soc_card_set_drvdata(&mop500_card, NULL);
participants (3)
-
Donglin Peng
-
Mark Brown
-
Peng Donglin