Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1718298 > unrolled thread

[PATCH v2 00/10] Remove unnecessary function

Started byPeng Donglin <dolinux.peng@gmail.com>
First post2017-08-23 14:20 +0200
Last post2017-08-23 14:30 +0200
Articles 9 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH v2 00/10] Remove unnecessary function Peng Donglin <dolinux.peng@gmail.com> - 2017-08-23 14:20 +0200
    [PATCH v2 03/10] ASoC: Intel: Remove unnecessary function call Peng Donglin <dolinux.peng@gmail.com> - 2017-08-23 14:20 +0200
    [PATCH v2 04/10] ASoC: atmel: Remove unnecessary function call Peng Donglin <dolinux.peng@gmail.com> - 2017-08-23 14:20 +0200
    [PATCH v2 06/10] ASoC: mxs-sgtl5000: Remove unnecessary function call Peng Donglin <dolinux.peng@gmail.com> - 2017-08-23 14:30 +0200
    [PATCH v2 08/10] ASoC: sun4i-codec: Remove unnecessary function call Peng Donglin <dolinux.peng@gmail.com> - 2017-08-23 14:30 +0200
    [PATCH v2 05/10] ASoC: rockchip: Remove unnecessary function call Peng Donglin <dolinux.peng@gmail.com> - 2017-08-23 14:30 +0200
    [PATCH v2 09/10] ASoC: tegra: Remove unnecessary function call Peng Donglin <dolinux.peng@gmail.com> - 2017-08-23 14:30 +0200
    [PATCH v2 07/10] ASoC: qcom: Remove useless function call Peng Donglin <dolinux.peng@gmail.com> - 2017-08-23 14:30 +0200
    [PATCH v2 10/10] ASoC: ux500: Remove unnecessary function call Peng Donglin <dolinux.peng@gmail.com> - 2017-08-23 14:30 +0200

#1718298 — [PATCH v2 00/10] Remove unnecessary function

FromPeng Donglin <dolinux.peng@gmail.com>
Date2017-08-23 14:20 +0200
Subject[PATCH v2 00/10] Remove unnecessary function
Message-ID<uhCNz-qT-3@gated-at.bofh.it>
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(-)

-- 
2.14.1

[toc] | [next] | [standalone]


#1718301 — [PATCH v2 03/10] ASoC: Intel: Remove unnecessary function call

FromPeng Donglin <dolinux.peng@gmail.com>
Date2017-08-23 14:20 +0200
Subject[PATCH v2 03/10] ASoC: Intel: Remove unnecessary function call
Message-ID<uhCNA-qT-27@gated-at.bofh.it>
In reply to#1718298
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;
 }
 
-- 
2.14.1

[toc] | [prev] | [next] | [standalone]


#1718304 — [PATCH v2 04/10] ASoC: atmel: Remove unnecessary function call

FromPeng Donglin <dolinux.peng@gmail.com>
Date2017-08-23 14:20 +0200
Subject[PATCH v2 04/10] ASoC: atmel: Remove unnecessary function call
Message-ID<uhCNA-qT-35@gated-at.bofh.it>
In reply to#1718298
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) {
-- 
2.14.1

[toc] | [prev] | [next] | [standalone]


#1718307 — [PATCH v2 06/10] ASoC: mxs-sgtl5000: Remove unnecessary function call

FromPeng Donglin <dolinux.peng@gmail.com>
Date2017-08-23 14:30 +0200
Subject[PATCH v2 06/10] ASoC: mxs-sgtl5000: Remove unnecessary function call
Message-ID<uhCXg-u4-1@gated-at.bofh.it>
In reply to#1718298
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)
-- 
2.14.1

[toc] | [prev] | [next] | [standalone]


#1718311 — [PATCH v2 08/10] ASoC: sun4i-codec: Remove unnecessary function call

FromPeng Donglin <dolinux.peng@gmail.com>
Date2017-08-23 14:30 +0200
Subject[PATCH v2 08/10] ASoC: sun4i-codec: Remove unnecessary function call
Message-ID<uhCXg-u4-9@gated-at.bofh.it>
In reply to#1718298
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);
-- 
2.14.1

[toc] | [prev] | [next] | [standalone]


#1718312 — [PATCH v2 05/10] ASoC: rockchip: Remove unnecessary function call

FromPeng Donglin <dolinux.peng@gmail.com>
Date2017-08-23 14:30 +0200
Subject[PATCH v2 05/10] ASoC: rockchip: Remove unnecessary function call
Message-ID<uhCXg-u4-11@gated-at.bofh.it>
In reply to#1718298
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;
 }
-- 
2.14.1

[toc] | [prev] | [next] | [standalone]


#1718315 — [PATCH v2 09/10] ASoC: tegra: Remove unnecessary function call

FromPeng Donglin <dolinux.peng@gmail.com>
Date2017-08-23 14:30 +0200
Subject[PATCH v2 09/10] ASoC: tegra: Remove unnecessary function call
Message-ID<uhCXh-u4-19@gated-at.bofh.it>
In reply to#1718298
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,
-- 
2.14.1

[toc] | [prev] | [next] | [standalone]


#1718318 — [PATCH v2 07/10] ASoC: qcom: Remove useless function call

FromPeng Donglin <dolinux.peng@gmail.com>
Date2017-08-23 14:30 +0200
Subject[PATCH v2 07/10] ASoC: qcom: Remove useless function call
Message-ID<uhCXh-u4-27@gated-at.bofh.it>
In reply to#1718298
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) {
-- 
2.14.1

[toc] | [prev] | [next] | [standalone]


#1718319 — [PATCH v2 10/10] ASoC: ux500: Remove unnecessary function call

FromPeng Donglin <dolinux.peng@gmail.com>
Date2017-08-23 14:30 +0200
Subject[PATCH v2 10/10] ASoC: ux500: Remove unnecessary function call
Message-ID<uhCXh-u4-29@gated-at.bofh.it>
In reply to#1718298
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);
 
-- 
2.14.1

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web