Skip to contentSkip to conversation

ASoC: use devm_xxx

PATCH In review Kuninori Morimoto 3 participants 35 messages Jun 28, 2019 – Jul 3, 2019

Subsystems (13)
lore
Share & tools
lore
#0 lore raw

v2 cover ASoC: use devm_xxx

Hi Mark

These are v2 patch of converting for devm_xxx().
v2 is caring about related empty functions.

Kuninori Morimoto (23):
ASoC: atmel: atmel-pcm-dma.c: use devm_snd_dmaengine_pcm_register()
ASoC: sunxi: sun4i-i2s.c: use devm_snd_dmaengine_pcm_register()
ASoC: tegra: tegra_pcm.c: use devm_snd_dmaengine_pcm_register()
ASoC: ux500: ux500_pcm.c: use devm_snd_dmaengine_pcm_register()
ASoC: au1x: i2sc.c: use devm_snd_soc_register_component()
ASoC: au1x: ac97c.c: use devm_snd_soc_register_component()
ASoC: au1x: psc-ac97.c: use devm_snd_soc_register_component()
ASoC: au1x: psc-i2s.c: use devm_snd_soc_register_component()
ASoC: cirrus: ep93xx-i2s.c: use devm_snd_soc_register_component()
ASoC: cirrus: ep93xx-ac97.c: use devm_snd_soc_register_component()
ASoC: rt5682: use devm_snd_soc_register_component()
ASoC: ak4118: use devm_snd_soc_register_component()
ASoC: cros_ec_codec: use devm_snd_soc_register_component()
ASoC: fsl: imx-ssi.c: use devm_snd_soc_register_component()
ASoC: fsl: mpc5200_psc_i2s.c: use devm_snd_soc_register_component()
ASoC: fsl: mpc5200_psc_ac97.c: use devm_snd_soc_register_component()
ASoC: pxa: pxa2xx-ac97.c: use devm_snd_soc_register_component()
ASoC: tegra: tegra20_i2s.c: use devm_snd_soc_register_component()
ASoC: tegra: tegra20_spdif.c: use devm_snd_soc_register_component()
ASoC: tegra: tegra20_ac97.c: use devm_snd_soc_register_component()
ASoC: tegra: tegra30_i2s.c: use devm_snd_soc_register_component()
ASoC: ti: davinci-i2s.c: use devm_snd_soc_register_component()
ASoC: ux500: ux500_msp_dai.c: use devm_snd_soc_register_component()

 sound/soc/atmel/atmel-pcm-dma.c  |  9 ++-------
 sound/soc/atmel/atmel-pcm-pdc.c  |  5 -----
 sound/soc/atmel/atmel-pcm.h      |  8 --------
 sound/soc/atmel/atmel_ssc_dai.c  | 11 -----------
 sound/soc/au1x/ac97c.c           |  4 +---
 sound/soc/au1x/i2sc.c            |  4 +---
 sound/soc/au1x/psc-ac97.c        |  6 ++----
 sound/soc/au1x/psc-i2s.c         |  6 ++----
 sound/soc/cirrus/ep93xx-ac97.c   | 10 +++-------
 sound/soc/cirrus/ep93xx-i2s.c    |  7 ++-----
 sound/soc/codecs/ak4118.c        | 11 ++---------
 sound/soc/codecs/cros_ec_codec.c |  2 +-
 sound/soc/codecs/rt5682.c        | 13 +++----------
 sound/soc/fsl/imx-ssi.c          |  8 ++------
 sound/soc/fsl/mpc5200_psc_ac97.c |  3 +--
 sound/soc/fsl/mpc5200_psc_i2s.c  |  3 +--
 sound/soc/pxa/pxa2xx-ac97.c      |  3 +--
 sound/soc/sunxi/sun4i-i2s.c      |  4 +---
 sound/soc/tegra/tegra20_ac97.c   | 11 +++--------
 sound/soc/tegra/tegra20_i2s.c    | 11 +++--------
 sound/soc/tegra/tegra20_spdif.c  | 12 ++++--------
 sound/soc/tegra/tegra30_i2s.c    | 11 +++--------
 sound/soc/tegra/tegra_pcm.c      | 11 +++--------
 sound/soc/tegra/tegra_pcm.h      |  1 -
 sound/soc/ti/davinci-i2s.c       |  8 ++------
 sound/soc/ux500/ux500_msp_dai.c  | 12 ++----------
 sound/soc/ux500/ux500_pcm.c      |  9 +--------
 sound/soc/ux500/ux500_pcm.h      |  1 -
 28 files changed, 46 insertions(+), 158 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/23 ASoC: atmel: atmel-pcm-dma.c: use devm_snd_dmaengine_pcm_register()

From: Kuninori Morimoto <[email protected]>

We have devm_xxx version of snd_dmaengine_pcm_register, let's use it.

This patch also removes related empty functions

---
v1 -> v2

- remove empty functions

 sound/soc/atmel/atmel-pcm-dma.c |  9 ++-------
 sound/soc/atmel/atmel-pcm-pdc.c |  5 -----
 sound/soc/atmel/atmel-pcm.h     |  8 --------
 sound/soc/atmel/atmel_ssc_dai.c | 11 -----------
 4 files changed, 2 insertions(+), 31 deletions(-)
sound/soc/atmel/atmel-pcm-dma.c +2 -7
index 042e593..db67f5b 100644
@@ -111,16 +111,11 @@ static const struct snd_dmaengine_pcm_config atmel_dmaengine_pcm_config = {
 
 int atmel_pcm_dma_platform_register(struct device *dev)
 {
-	return snd_dmaengine_pcm_register(dev, &atmel_dmaengine_pcm_config, 0);
+	return devm_snd_dmaengine_pcm_register(dev,
+					&atmel_dmaengine_pcm_config, 0);
 }
 EXPORT_SYMBOL(atmel_pcm_dma_platform_register);
 
-void atmel_pcm_dma_platform_unregister(struct device *dev)
-{
-	snd_dmaengine_pcm_unregister(dev);
-}
-EXPORT_SYMBOL(atmel_pcm_dma_platform_unregister);
-
 MODULE_AUTHOR("Bo Shen <[email protected]>");
 MODULE_DESCRIPTION("Atmel DMA based PCM module");
 MODULE_LICENSE("GPL");
sound/soc/atmel/atmel-pcm-pdc.c +0 -5
index 7e9aa70..ed095af 100644
@@ -393,11 +393,6 @@ int atmel_pcm_pdc_platform_register(struct device *dev)
 }
 EXPORT_SYMBOL(atmel_pcm_pdc_platform_register);
 
-void atmel_pcm_pdc_platform_unregister(struct device *dev)
-{
-}
-EXPORT_SYMBOL(atmel_pcm_pdc_platform_unregister);
-
 MODULE_AUTHOR("Sedji Gaouaou <[email protected]>");
 MODULE_DESCRIPTION("Atmel PCM module");
 MODULE_LICENSE("GPL");
sound/soc/atmel/atmel-pcm.h +0 -8
index 5173c9b..2e64874 100644
@@ -72,28 +72,20 @@ struct atmel_pcm_dma_params {
 
 #if IS_ENABLED(CONFIG_SND_ATMEL_SOC_PDC)
 int atmel_pcm_pdc_platform_register(struct device *dev);
-void atmel_pcm_pdc_platform_unregister(struct device *dev);
 #else
 static inline int atmel_pcm_pdc_platform_register(struct device *dev)
 {
 	return 0;
 }
-static inline void atmel_pcm_pdc_platform_unregister(struct device *dev)
-{
-}
 #endif
 
 #if IS_ENABLED(CONFIG_SND_ATMEL_SOC_DMA)
 int atmel_pcm_dma_platform_register(struct device *dev);
-void atmel_pcm_dma_platform_unregister(struct device *dev);
 #else
 static inline int atmel_pcm_dma_platform_register(struct device *dev)
 {
 	return 0;
 }
-static inline void atmel_pcm_dma_platform_unregister(struct device *dev)
-{
-}
 #endif
 
 #endif /* _ATMEL_PCM_H */
sound/soc/atmel/atmel_ssc_dai.c +0 -11
index b66c778..6f89483 100644
@@ -1012,16 +1012,6 @@ static int asoc_ssc_init(struct device *dev)
 	return 0;
 }
 
-static void asoc_ssc_exit(struct device *dev)
-{
-	struct ssc_device *ssc = dev_get_drvdata(dev);
-
-	if (ssc->pdata->use_dma)
-		atmel_pcm_dma_platform_unregister(dev);
-	else
-		atmel_pcm_pdc_platform_unregister(dev);
-}
-
 /**
  * atmel_ssc_set_audio - Allocate the specified SSC for audio use.
  */
@@ -1050,7 +1040,6 @@ void atmel_ssc_put_audio(int ssc_id)
 {
 	struct ssc_device *ssc = ssc_info[ssc_id].ssc;
 
-	asoc_ssc_exit(&ssc->pdev->dev);
 	ssc_free(ssc);
 }
 EXPORT_SYMBOL_GPL(atmel_ssc_put_audio);
Signature · 1 line
2.7.4
Reviewed-by on v2 1/23
#2 lore raw

Re: [PATCH v2 01/23] ASoC: atmel: atmel-pcm-dma.c: use devm_snd_dmaengine_pcm_register()

Quoted 5 lines · Kuninori Morimoto

External E-Mail

From: Kuninori Morimoto <[email protected]>

Quoted 7 lines

We have devm_xxx version of snd_dmaengine_pcm_register, let's use it.

This patch also removes related empty functions

---

Thanks again!

Best regards,
Codrin

Quoted 112 lines

v1 -> v2

- remove empty functions

  sound/soc/atmel/atmel-pcm-dma.c |  9 ++-------
  sound/soc/atmel/atmel-pcm-pdc.c |  5 -----
  sound/soc/atmel/atmel-pcm.h     |  8 --------
  sound/soc/atmel/atmel_ssc_dai.c | 11 -----------
  4 files changed, 2 insertions(+), 31 deletions(-)
sound/soc/atmel/atmel-pcm-dma.c +2 -7
index 042e593..db67f5b 100644
@@ -111,16 +111,11 @@ static const struct snd_dmaengine_pcm_config atmel_dmaengine_pcm_config = {
 
  int atmel_pcm_dma_platform_register(struct device *dev)
  {
-	return snd_dmaengine_pcm_register(dev, &atmel_dmaengine_pcm_config, 0);
+	return devm_snd_dmaengine_pcm_register(dev,
+					&atmel_dmaengine_pcm_config, 0);
  }
  EXPORT_SYMBOL(atmel_pcm_dma_platform_register);
 
-void atmel_pcm_dma_platform_unregister(struct device *dev)
-{
-	snd_dmaengine_pcm_unregister(dev);
-}
-EXPORT_SYMBOL(atmel_pcm_dma_platform_unregister);
-
  MODULE_AUTHOR("Bo Shen <[email protected]>");
  MODULE_DESCRIPTION("Atmel DMA based PCM module");
  MODULE_LICENSE("GPL");
sound/soc/atmel/atmel-pcm-pdc.c +0 -5
index 7e9aa70..ed095af 100644
@@ -393,11 +393,6 @@ int atmel_pcm_pdc_platform_register(struct device *dev)
  }
  EXPORT_SYMBOL(atmel_pcm_pdc_platform_register);
 
-void atmel_pcm_pdc_platform_unregister(struct device *dev)
-{
-}
-EXPORT_SYMBOL(atmel_pcm_pdc_platform_unregister);
-
  MODULE_AUTHOR("Sedji Gaouaou <[email protected]>");
  MODULE_DESCRIPTION("Atmel PCM module");
  MODULE_LICENSE("GPL");
sound/soc/atmel/atmel-pcm.h +0 -8
index 5173c9b..2e64874 100644
@@ -72,28 +72,20 @@ struct atmel_pcm_dma_params {
 
  #if IS_ENABLED(CONFIG_SND_ATMEL_SOC_PDC)
  int atmel_pcm_pdc_platform_register(struct device *dev);
-void atmel_pcm_pdc_platform_unregister(struct device *dev);
  #else
  static inline int atmel_pcm_pdc_platform_register(struct device *dev)
  {
  	return 0;
  }
-static inline void atmel_pcm_pdc_platform_unregister(struct device *dev)
-{
-}
  #endif
 
  #if IS_ENABLED(CONFIG_SND_ATMEL_SOC_DMA)
  int atmel_pcm_dma_platform_register(struct device *dev);
-void atmel_pcm_dma_platform_unregister(struct device *dev);
  #else
  static inline int atmel_pcm_dma_platform_register(struct device *dev)
  {
  	return 0;
  }
-static inline void atmel_pcm_dma_platform_unregister(struct device *dev)
-{
-}
  #endif
 
  #endif /* _ATMEL_PCM_H */
sound/soc/atmel/atmel_ssc_dai.c +0 -11
index b66c778..6f89483 100644
@@ -1012,16 +1012,6 @@ static int asoc_ssc_init(struct device *dev)
  	return 0;
  }
 
-static void asoc_ssc_exit(struct device *dev)
-{
-	struct ssc_device *ssc = dev_get_drvdata(dev);
-
-	if (ssc->pdata->use_dma)
-		atmel_pcm_dma_platform_unregister(dev);
-	else
-		atmel_pcm_pdc_platform_unregister(dev);
-}
-
  /**
   * atmel_ssc_set_audio - Allocate the specified SSC for audio use.
   */
@@ -1050,7 +1040,6 @@ void atmel_ssc_put_audio(int ssc_id)
  {
  	struct ssc_device *ssc = ssc_info[ssc_id].ssc;
 
-	asoc_ssc_exit(&ssc->pdev->dev);
  	ssc_free(ssc);
  }
  EXPORT_SYMBOL_GPL(atmel_ssc_put_audio);
maintainer
#3 lore raw

Applied "ASoC: atmel: atmel-pcm-dma.c: use devm_snd_dmaengine_pcm_register()" to the asoc tree

In reply to Kuninori Morimoto

The patch

ASoC: atmel: atmel-pcm-dma.c: use devm_snd_dmaengine_pcm_register()

has been applied to the asoc tree at

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

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

Quoted 1 line

From 8af26493c03581ad476a77630502de6152cf013d Mon Sep 17 00:00:00 2001

From: Kuninori Morimoto <[email protected]>
Date: Fri, 28 Jun 2019 13:07:05 +0900
Subject: [PATCH] ASoC: atmel: atmel-pcm-dma.c: use
devm_snd_dmaengine_pcm_register()

We have devm_xxx version of snd_dmaengine_pcm_register, let's use it.

This patch also removes related empty functions

---
 sound/soc/atmel/atmel-pcm-dma.c |  9 ++-------
 sound/soc/atmel/atmel-pcm-pdc.c |  5 -----
 sound/soc/atmel/atmel-pcm.h     |  8 --------
 sound/soc/atmel/atmel_ssc_dai.c | 11 -----------
 4 files changed, 2 insertions(+), 31 deletions(-)
sound/soc/atmel/atmel-pcm-dma.c +2 -7
index 042e59309bcd..db67f5ba1e9a 100644
@@ -111,16 +111,11 @@ static const struct snd_dmaengine_pcm_config atmel_dmaengine_pcm_config = {
 
 int atmel_pcm_dma_platform_register(struct device *dev)
 {
-	return snd_dmaengine_pcm_register(dev, &atmel_dmaengine_pcm_config, 0);
+	return devm_snd_dmaengine_pcm_register(dev,
+					&atmel_dmaengine_pcm_config, 0);
 }
 EXPORT_SYMBOL(atmel_pcm_dma_platform_register);
 
-void atmel_pcm_dma_platform_unregister(struct device *dev)
-{
-	snd_dmaengine_pcm_unregister(dev);
-}
-EXPORT_SYMBOL(atmel_pcm_dma_platform_unregister);
-
 MODULE_AUTHOR("Bo Shen <[email protected]>");
 MODULE_DESCRIPTION("Atmel DMA based PCM module");
 MODULE_LICENSE("GPL");
sound/soc/atmel/atmel-pcm-pdc.c +0 -5
index 7e9aa7003305..ed095af866db 100644
@@ -393,11 +393,6 @@ int atmel_pcm_pdc_platform_register(struct device *dev)
 }
 EXPORT_SYMBOL(atmel_pcm_pdc_platform_register);
 
-void atmel_pcm_pdc_platform_unregister(struct device *dev)
-{
-}
-EXPORT_SYMBOL(atmel_pcm_pdc_platform_unregister);
-
 MODULE_AUTHOR("Sedji Gaouaou <[email protected]>");
 MODULE_DESCRIPTION("Atmel PCM module");
 MODULE_LICENSE("GPL");
sound/soc/atmel/atmel-pcm.h +0 -8
index 5173c9b529ba..2e648748e5cb 100644
@@ -72,28 +72,20 @@ struct atmel_pcm_dma_params {
 
 #if IS_ENABLED(CONFIG_SND_ATMEL_SOC_PDC)
 int atmel_pcm_pdc_platform_register(struct device *dev);
-void atmel_pcm_pdc_platform_unregister(struct device *dev);
 #else
 static inline int atmel_pcm_pdc_platform_register(struct device *dev)
 {
 	return 0;
 }
-static inline void atmel_pcm_pdc_platform_unregister(struct device *dev)
-{
-}
 #endif
 
 #if IS_ENABLED(CONFIG_SND_ATMEL_SOC_DMA)
 int atmel_pcm_dma_platform_register(struct device *dev);
-void atmel_pcm_dma_platform_unregister(struct device *dev);
 #else
 static inline int atmel_pcm_dma_platform_register(struct device *dev)
 {
 	return 0;
 }
-static inline void atmel_pcm_dma_platform_unregister(struct device *dev)
-{
-}
 #endif
 
 #endif /* _ATMEL_PCM_H */
sound/soc/atmel/atmel_ssc_dai.c +0 -11
index b66c7789d096..6f89483ac88c 100644
@@ -1012,16 +1012,6 @@ static int asoc_ssc_init(struct device *dev)
 	return 0;
 }
 
-static void asoc_ssc_exit(struct device *dev)
-{
-	struct ssc_device *ssc = dev_get_drvdata(dev);
-
-	if (ssc->pdata->use_dma)
-		atmel_pcm_dma_platform_unregister(dev);
-	else
-		atmel_pcm_pdc_platform_unregister(dev);
-}
-
 /**
  * atmel_ssc_set_audio - Allocate the specified SSC for audio use.
  */
@@ -1050,7 +1040,6 @@ void atmel_ssc_put_audio(int ssc_id)
 {
 	struct ssc_device *ssc = ssc_info[ssc_id].ssc;
 
-	asoc_ssc_exit(&ssc->pdev->dev);
 	ssc_free(ssc);
 }
 EXPORT_SYMBOL_GPL(atmel_ssc_put_audio);
Signature · 1 line
2.20.1
#4 lore raw

PATCH v2 2/23 ASoC: sunxi: sun4i-i2s.c: use devm_snd_dmaengine_pcm_register()

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

We have devm_xxx version of snd_dmaengine_pcm_register, let's use it.

---
v1 -> v2

- no change

 sound/soc/sunxi/sun4i-i2s.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
sound/soc/sunxi/sun4i-i2s.c +1 -3
index 9b22329..64a9fea 100644
@@ -1156,7 +1156,7 @@ static int sun4i_i2s_probe(struct platform_device *pdev)
 		goto err_suspend;
 	}
 
-	ret = snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
+	ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
 	if (ret) {
 		dev_err(&pdev->dev, "Could not register PCM\n");
 		goto err_suspend;
@@ -1185,8 +1185,6 @@ static int sun4i_i2s_remove(struct platform_device *pdev)
 {
 	struct sun4i_i2s *i2s = dev_get_drvdata(&pdev->dev);
 
-	snd_dmaengine_pcm_unregister(&pdev->dev);
-
 	pm_runtime_disable(&pdev->dev);
 	if (!pm_runtime_status_suspended(&pdev->dev))
 		sun4i_i2s_runtime_suspend(&pdev->dev);
Signature · 1 line
2.7.4
#5 lore raw

PATCH v2 3/23 ASoC: tegra: tegra_pcm.c: use devm_snd_dmaengine_pcm_register()

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

We have devm_xxx version of snd_dmaengine_pcm_register, let's use it.

This patch also removes related empty functions

---
v1 -> v2

- remove empty functions

 sound/soc/tegra/tegra20_ac97.c  |  1 -
 sound/soc/tegra/tegra20_i2s.c   |  1 -
 sound/soc/tegra/tegra20_spdif.c |  1 -
 sound/soc/tegra/tegra30_i2s.c   |  1 -
 sound/soc/tegra/tegra_pcm.c     | 11 +++--------
 sound/soc/tegra/tegra_pcm.h     |  1 -
 6 files changed, 3 insertions(+), 13 deletions(-)
sound/soc/tegra/tegra20_ac97.c +0 -1
index 09c8516..7c359c4 100644
@@ -410,7 +410,6 @@ static int tegra20_ac97_platform_remove(struct platform_device *pdev)
 {
 	struct tegra20_ac97 *ac97 = dev_get_drvdata(&pdev->dev);
 
-	tegra_pcm_platform_unregister(&pdev->dev);
 	snd_soc_unregister_component(&pdev->dev);
 
 	clk_disable_unprepare(ac97->clk_ac97);
sound/soc/tegra/tegra20_i2s.c +0 -1
index 005fc4e6..fd94911 100644
@@ -413,7 +413,6 @@ static int tegra20_i2s_platform_remove(struct platform_device *pdev)
 	if (!pm_runtime_status_suspended(&pdev->dev))
 		tegra20_i2s_runtime_suspend(&pdev->dev);
 
-	tegra_pcm_platform_unregister(&pdev->dev);
 	snd_soc_unregister_component(&pdev->dev);
 
 	clk_put(i2s->clk_i2s);
sound/soc/tegra/tegra20_spdif.c +0 -1
index 5839833..cde526d 100644
@@ -333,7 +333,6 @@ static int tegra20_spdif_platform_remove(struct platform_device *pdev)
 	if (!pm_runtime_status_suspended(&pdev->dev))
 		tegra20_spdif_runtime_suspend(&pdev->dev);
 
-	tegra_pcm_platform_unregister(&pdev->dev);
 	snd_soc_unregister_component(&pdev->dev);
 
 	return 0;
sound/soc/tegra/tegra30_i2s.c +0 -1
index ac6983c..2f70bf0 100644
@@ -510,7 +510,6 @@ static int tegra30_i2s_platform_remove(struct platform_device *pdev)
 	if (!pm_runtime_status_suspended(&pdev->dev))
 		tegra30_i2s_runtime_suspend(&pdev->dev);
 
-	tegra_pcm_platform_unregister(&pdev->dev);
 	snd_soc_unregister_component(&pdev->dev);
 
 	tegra30_ahub_unset_rx_cif_source(i2s->capture_fifo_cif);
sound/soc/tegra/tegra_pcm.c +3 -8
index f246df8..c532555 100644
@@ -44,7 +44,8 @@ static const struct snd_dmaengine_pcm_config tegra_dmaengine_pcm_config = {
 
 int tegra_pcm_platform_register(struct device *dev)
 {
-	return snd_dmaengine_pcm_register(dev, &tegra_dmaengine_pcm_config, 0);
+	return devm_snd_dmaengine_pcm_register(dev,
+					&tegra_dmaengine_pcm_config, 0);
 }
 EXPORT_SYMBOL_GPL(tegra_pcm_platform_register);
 
@@ -57,16 +58,10 @@ int tegra_pcm_platform_register_with_chan_names(struct device *dev,
 	config->chan_names[0] = txdmachan;
 	config->chan_names[1] = rxdmachan;
 
-	return snd_dmaengine_pcm_register(dev, config, 0);
+	return devm_snd_dmaengine_pcm_register(dev, config, 0);
 }
 EXPORT_SYMBOL_GPL(tegra_pcm_platform_register_with_chan_names);
 
-void tegra_pcm_platform_unregister(struct device *dev)
-{
-	return snd_dmaengine_pcm_unregister(dev);
-}
-EXPORT_SYMBOL_GPL(tegra_pcm_platform_unregister);
-
 MODULE_AUTHOR("Stephen Warren <[email protected]>");
 MODULE_DESCRIPTION("Tegra PCM ASoC driver");
 MODULE_LICENSE("GPL");
sound/soc/tegra/tegra_pcm.h +0 -1
index 0433372..6eb8f8d 100644
@@ -23,6 +23,5 @@ int tegra_pcm_platform_register(struct device *dev);
 int tegra_pcm_platform_register_with_chan_names(struct device *dev,
 				struct snd_dmaengine_pcm_config *config,
 				char *txdmachan, char *rxdmachan);
-void tegra_pcm_platform_unregister(struct device *dev);
 
 #endif
Signature · 1 line
2.7.4
#6 lore raw

PATCH v2 4/23 ASoC: ux500: ux500_pcm.c: use devm_snd_dmaengine_pcm_register()

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

We have devm_xxx version of snd_dmaengine_pcm_register, let's use it.

This patch also removes related empty functions

---
v1 -> v2

- remove empty functions

 sound/soc/ux500/ux500_msp_dai.c | 2 --
 sound/soc/ux500/ux500_pcm.c     | 9 +--------
 sound/soc/ux500/ux500_pcm.h     | 1 -
 3 files changed, 1 insertion(+), 11 deletions(-)
sound/soc/ux500/ux500_msp_dai.c +0 -2
index dec065f..35669b7 100644
@@ -827,8 +827,6 @@ static int ux500_msp_drv_remove(struct platform_device *pdev)
 {
 	struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(&pdev->dev);
 
-	ux500_pcm_unregister_platform(pdev);
-
 	snd_soc_unregister_component(&pdev->dev);
 
 	prcmu_qos_remove_requirement(PRCMU_QOS_APE_OPP, "ux500_msp_i2s");
sound/soc/ux500/ux500_pcm.c +1 -8
index 9445dbe..58f00d9 100644
@@ -143,7 +143,7 @@ int ux500_pcm_register_platform(struct platform_device *pdev)
 	else
 		pcm_config = &ux500_dmaengine_pcm_config;
 
-	ret = snd_dmaengine_pcm_register(&pdev->dev, pcm_config,
+	ret = devm_snd_dmaengine_pcm_register(&pdev->dev, pcm_config,
 					 SND_DMAENGINE_PCM_FLAG_COMPAT);
 	if (ret < 0) {
 		dev_err(&pdev->dev,
@@ -156,13 +156,6 @@ int ux500_pcm_register_platform(struct platform_device *pdev)
 }
 EXPORT_SYMBOL_GPL(ux500_pcm_register_platform);
 
-int ux500_pcm_unregister_platform(struct platform_device *pdev)
-{
-	snd_dmaengine_pcm_unregister(&pdev->dev);
-	return 0;
-}
-EXPORT_SYMBOL_GPL(ux500_pcm_unregister_platform);
-
 MODULE_AUTHOR("Ola Lilja");
 MODULE_AUTHOR("Roger Nilsson");
 MODULE_DESCRIPTION("ASoC UX500 driver");
sound/soc/ux500/ux500_pcm.h +0 -1
index ff3ef72..d05bff2 100644
@@ -16,6 +16,5 @@
 #include <linux/workqueue.h>
 
 int ux500_pcm_register_platform(struct platform_device *pdev);
-int ux500_pcm_unregister_platform(struct platform_device *pdev);
 
 #endif
Signature · 1 line
2.7.4
#7 lore raw

PATCH v2 5/23 ASoC: au1x: i2sc.c: use devm_snd_soc_register_component()

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

We have devm_xxx version of snd_soc_register_component, let's use it.

---
v1 -> v2

- no change

 sound/soc/au1x/i2sc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
sound/soc/au1x/i2sc.c +1 -3
index 46f2b44..6877365 100644
@@ -265,7 +265,7 @@ static int au1xi2s_drvprobe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, ctx);
 
-	return snd_soc_register_component(&pdev->dev, &au1xi2s_component,
+	return devm_snd_soc_register_component(&pdev->dev, &au1xi2s_component,
 					  &au1xi2s_dai_driver, 1);
 }
 
@@ -273,8 +273,6 @@ static int au1xi2s_drvremove(struct platform_device *pdev)
 {
 	struct au1xpsc_audio_data *ctx = platform_get_drvdata(pdev);
 
-	snd_soc_unregister_component(&pdev->dev);
-
 	WR(ctx, I2S_ENABLE, EN_D);	/* clock off, disable */
 
 	return 0;
Signature · 1 line
2.7.4
#8 lore raw

PATCH v2 6/23 ASoC: au1x: ac97c.c: use devm_snd_soc_register_component()

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

We have devm_xxx version of snd_soc_register_component, let's use it.

---
v1 -> v2

- no change

 sound/soc/au1x/ac97c.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
sound/soc/au1x/ac97c.c +1 -3
index 0792c40..6f2eca2 100644
@@ -276,7 +276,7 @@ static int au1xac97c_drvprobe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	ret = snd_soc_register_component(&pdev->dev, &au1xac97c_component,
+	ret = devm_snd_soc_register_component(&pdev->dev, &au1xac97c_component,
 					 &au1xac97c_dai_driver, 1);
 	if (ret)
 		return ret;
@@ -289,8 +289,6 @@ static int au1xac97c_drvremove(struct platform_device *pdev)
 {
 	struct au1xpsc_audio_data *ctx = platform_get_drvdata(pdev);
 
-	snd_soc_unregister_component(&pdev->dev);
-
 	WR(ctx, AC97_ENABLE, EN_D);	/* clock off, disable */
 
 	ac97c_workdata = NULL;	/* MDEV */
Signature · 1 line
2.7.4
#9 lore raw

PATCH v2 7/23 ASoC: au1x: psc-ac97.c: use devm_snd_soc_register_component()

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

We have devm_xxx version of snd_soc_register_component, let's use it.

---
v1 -> v2

- no change

 sound/soc/au1x/psc-ac97.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
sound/soc/au1x/psc-ac97.c +2 -4
index 21e5f6a..0fd5478 100644
@@ -413,8 +413,8 @@ static int au1xpsc_ac97_drvprobe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	ret = snd_soc_register_component(&pdev->dev, &au1xpsc_ac97_component,
-					 &wd->dai_drv, 1);
+	ret = devm_snd_soc_register_component(&pdev->dev,
+				&au1xpsc_ac97_component, &wd->dai_drv, 1);
 	if (ret)
 		return ret;
 
@@ -426,8 +426,6 @@ static int au1xpsc_ac97_drvremove(struct platform_device *pdev)
 {
 	struct au1xpsc_audio_data *wd = platform_get_drvdata(pdev);
 
-	snd_soc_unregister_component(&pdev->dev);
-
 	/* disable PSC completely */
 	__raw_writel(0, AC97_CFG(wd));
 	wmb(); /* drain writebuffer */
Signature · 1 line
2.7.4
maintainer
#10 lore raw

Re: [PATCH v2 07/23] ASoC: au1x: psc-ac97.c: use devm_snd_soc_register_component()

sound/soc/au1x/psc-ac97.c static int au1xpsc_ac97_drvremove(struct platform_device *pdev) · line 431

Quoted 9 lines · Kuninori Morimoto
sound/soc/au1x/psc-ac97.c +0 -2
@@ -426,8 +426,6 @@ static int au1xpsc_ac97_drvremove(struct platform_device *pdev)
 {
 	struct au1xpsc_audio_data *wd = platform_get_drvdata(pdev);
 
-	snd_soc_unregister_component(&pdev->dev);
-
 	/* disable PSC completely */
 	__raw_writel(0, AC97_CFG(wd));
 	wmb(); /* drain writebuffer */

I don't think this is 100% safe - with this change we will turn off the hardware block before we unregister the component which means that we might try to interact with it. If we're converting to devm then we need to be careful the ordering of the removal won't be affected.

#11 lore raw

Re: [PATCH v2 07/23] ASoC: au1x: psc-ac97.c: use devm_snd_soc_register_component()

Hi Mark

Quoted 4 lines
Quoted 4 lines
sound/soc/au1x/psc-ac97.c +0 -0
@@ -426,8 +426,6 @@ static int au1xpsc_ac97_drvremove(struct platform_device *pdev)
 {
 	struct au1xpsc_audio_data *wd = platform_get_drvdata(pdev);
 
Quoted 11 lines

sound/soc/au1x/psc-ac97.c static int au1xpsc_ac97_drvremove(struct platform_device *pdev) · line 431

Quoted 5 lines
sound/soc/au1x/psc-ac97.c +0 -2
-	snd_soc_unregister_component(&pdev->dev);
-
 	/* disable PSC completely */
 	__raw_writel(0, AC97_CFG(wd));
 	wmb(); /* drain writebuffer */

I don't think this is 100% safe - with this change we will turn off the hardware block before we unregister the component which means that we might try to interact with it. If we're converting to devm then we need to be careful the ordering of the removal won't be affected.

Hmm indeed.
Thank you for your review.

Thank you for your help !!
Best regards
---
Kuninori Morimoto

#12 lore raw

PATCH v2 8/23 ASoC: au1x: psc-i2s.c: use devm_snd_soc_register_component()

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

We have devm_xxx version of snd_soc_register_component, let's use it.

---
v1 -> v2

- no change

 sound/soc/au1x/psc-i2s.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
sound/soc/au1x/psc-i2s.c +2 -4
index 4a5a095..076303f 100644
@@ -340,16 +340,14 @@ static int au1xpsc_i2s_drvprobe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, wd);
 
-	return snd_soc_register_component(&pdev->dev, &au1xpsc_i2s_component,
-					  &wd->dai_drv, 1);
+	return devm_snd_soc_register_component(&pdev->dev,
+				&au1xpsc_i2s_component, &wd->dai_drv, 1);
 }
 
 static int au1xpsc_i2s_drvremove(struct platform_device *pdev)
 {
 	struct au1xpsc_audio_data *wd = platform_get_drvdata(pdev);
 
-	snd_soc_unregister_component(&pdev->dev);
-
 	__raw_writel(0, I2S_CFG(wd));
 	wmb(); /* drain writebuffer */
 	__raw_writel(PSC_CTRL_DISABLE, PSC_CTRL(wd));
Signature · 1 line
2.7.4
maintainer
#13 lore raw

Applied "ASoC: au1x: psc-i2s.c: use devm_snd_soc_register_component()" to the asoc tree

The patch

ASoC: au1x: psc-i2s.c: use devm_snd_soc_register_component()

has been applied to the asoc tree at

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

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

Quoted 1 line

From 7422104037773624d2a6cdb9becb68278befbd88 Mon Sep 17 00:00:00 2001

From: Kuninori Morimoto <[email protected]>
Date: Fri, 28 Jun 2019 13:08:48 +0900
Subject: [PATCH] ASoC: au1x: psc-i2s.c: use devm_snd_soc_register_component()

We have devm_xxx version of snd_soc_register_component, let's use it.

---
 sound/soc/au1x/psc-i2s.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
sound/soc/au1x/psc-i2s.c +2 -4
index 4a5a095076f4..076303f96b8c 100644
@@ -340,16 +340,14 @@ static int au1xpsc_i2s_drvprobe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, wd);
 
-	return snd_soc_register_component(&pdev->dev, &au1xpsc_i2s_component,
-					  &wd->dai_drv, 1);
+	return devm_snd_soc_register_component(&pdev->dev,
+				&au1xpsc_i2s_component, &wd->dai_drv, 1);
 }
 
 static int au1xpsc_i2s_drvremove(struct platform_device *pdev)
 {
 	struct au1xpsc_audio_data *wd = platform_get_drvdata(pdev);
 
-	snd_soc_unregister_component(&pdev->dev);
-
 	__raw_writel(0, I2S_CFG(wd));
 	wmb(); /* drain writebuffer */
 	__raw_writel(PSC_CTRL_DISABLE, PSC_CTRL(wd));
Signature · 1 line
2.20.1
#14 lore raw

PATCH v2 9/23 ASoC: cirrus: ep93xx-i2s.c: use devm_snd_soc_register_component()

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

We have devm_xxx version of snd_soc_register_component, let's use it.

---
v1 -> v2

- no change

 sound/soc/cirrus/ep93xx-i2s.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
sound/soc/cirrus/ep93xx-i2s.c +2 -5
index 6ca899b..0b4355e 100644
@@ -473,19 +473,17 @@ static int ep93xx_i2s_probe(struct platform_device *pdev)
 
 	dev_set_drvdata(&pdev->dev, info);
 
-	err = snd_soc_register_component(&pdev->dev, &ep93xx_i2s_component,
+	err = devm_snd_soc_register_component(&pdev->dev, &ep93xx_i2s_component,
 					 &ep93xx_i2s_dai, 1);
 	if (err)
 		goto fail_put_lrclk;
 
 	err = devm_ep93xx_pcm_platform_register(&pdev->dev);
 	if (err)
-		goto fail_unregister;
+		goto fail_put_lrclk;
 
 	return 0;
 
-fail_unregister:
-	snd_soc_unregister_component(&pdev->dev);
 fail_put_lrclk:
 	clk_put(info->lrclk);
 fail_put_sclk:
@@ -500,7 +498,6 @@ static int ep93xx_i2s_remove(struct platform_device *pdev)
 {
 	struct ep93xx_i2s_info *info = dev_get_drvdata(&pdev->dev);
 
-	snd_soc_unregister_component(&pdev->dev);
 	clk_put(info->lrclk);
 	clk_put(info->sclk);
 	clk_put(info->mclk);
Signature · 1 line
2.7.4
maintainer
#15 lore raw

Re: [PATCH v2 09/23] ASoC: cirrus: ep93xx-i2s.c: use devm_snd_soc_register_component()

sound/soc/cirrus/ep93xx-i2s.c static int ep93xx_i2s_remove(struct platform_device *pdev) · line 503

Quoted 6 lines · Kuninori Morimoto
sound/soc/cirrus/ep93xx-i2s.c +0 -1
 	struct ep93xx_i2s_info *info = dev_get_drvdata(&pdev->dev);
 
-	snd_soc_unregister_component(&pdev->dev);
 	clk_put(info->lrclk);
 	clk_put(info->sclk);
 	clk_put(info->mclk);

I'll apply this one since it already has issues with the platform registration and the fix is to convert to devm_clk_get().

#16 lore raw

PATCH v2 10/23 ASoC: cirrus: ep93xx-ac97.c: use devm_snd_soc_register_component()

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

We have devm_xxx version of snd_soc_register_component, let's use it.

---
v1 -> v2

- no change

 sound/soc/cirrus/ep93xx-ac97.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
sound/soc/cirrus/ep93xx-ac97.c +3 -7
index 84c967f..f074857 100644
@@ -397,19 +397,17 @@ static int ep93xx_ac97_probe(struct platform_device *pdev)
 	if (ret)
 		goto fail;
 
-	ret = snd_soc_register_component(&pdev->dev, &ep93xx_ac97_component,
-					 &ep93xx_ac97_dai, 1);
+	ret = devm_snd_soc_register_component(&pdev->dev,
+				&ep93xx_ac97_component, &ep93xx_ac97_dai, 1);
 	if (ret)
 		goto fail;
 
 	ret = devm_ep93xx_pcm_platform_register(&pdev->dev);
 	if (ret)
-		goto fail_unregister;
+		goto fail;
 
 	return 0;
 
-fail_unregister:
-	snd_soc_unregister_component(&pdev->dev);
 fail:
 	ep93xx_ac97_info = NULL;
 	snd_soc_set_ac97_ops(NULL);
@@ -420,8 +418,6 @@ static int ep93xx_ac97_remove(struct platform_device *pdev)
 {
 	struct ep93xx_ac97_info	*info = platform_get_drvdata(pdev);
 
-	snd_soc_unregister_component(&pdev->dev);
-
 	/* disable the AC97 controller */
 	ep93xx_ac97_write_reg(info, AC97GCR, 0);
 
Signature · 1 line
2.7.4
#17 lore raw

PATCH v2 11/23 ASoC: rt5682: use devm_snd_soc_register_component()

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

We have devm_xxx version of snd_soc_register_component, let's use it.

This patch also removes related empty functions

---
v1 -> v2

- remove empty functions

 sound/soc/codecs/rt5682.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)
sound/soc/codecs/rt5682.c +3 -10
index 78409dd..1ef4707 100644
@@ -2662,15 +2662,9 @@ static int rt5682_i2c_probe(struct i2c_client *i2c,
 
 	}
 
-	return snd_soc_register_component(&i2c->dev, &soc_component_dev_rt5682,
-			rt5682_dai, ARRAY_SIZE(rt5682_dai));
-}
-
-static int rt5682_i2c_remove(struct i2c_client *i2c)
-{
-	snd_soc_unregister_component(&i2c->dev);
-
-	return 0;
+	return devm_snd_soc_register_component(&i2c->dev,
+					&soc_component_dev_rt5682,
+					rt5682_dai, ARRAY_SIZE(rt5682_dai));
 }
 
 static void rt5682_i2c_shutdown(struct i2c_client *client)
@@ -2703,7 +2697,6 @@ static struct i2c_driver rt5682_i2c_driver = {
 		.acpi_match_table = ACPI_PTR(rt5682_acpi_match),
 	},
 	.probe = rt5682_i2c_probe,
-	.remove = rt5682_i2c_remove,
 	.shutdown = rt5682_i2c_shutdown,
 	.id_table = rt5682_i2c_id,
 };
Signature · 1 line
2.7.4
maintainer
#18 lore raw

Applied "ASoC: rt5682: use devm_snd_soc_register_component()" to the asoc tree

The patch

ASoC: rt5682: use devm_snd_soc_register_component()

has been applied to the asoc tree at

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

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

Quoted 1 line

From 61c8a7d6ff11a31fc4ea47667c5f33119be7bcd3 Mon Sep 17 00:00:00 2001

From: Kuninori Morimoto <[email protected]>
Date: Fri, 28 Jun 2019 13:09:28 +0900
Subject: [PATCH] ASoC: rt5682: use devm_snd_soc_register_component()

We have devm_xxx version of snd_soc_register_component, let's use it.

This patch also removes related empty functions

---
 sound/soc/codecs/rt5682.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)
sound/soc/codecs/rt5682.c +3 -10
index 78409dd11488..1ef470700ed5 100644
@@ -2662,15 +2662,9 @@ static int rt5682_i2c_probe(struct i2c_client *i2c,
 
 	}
 
-	return snd_soc_register_component(&i2c->dev, &soc_component_dev_rt5682,
-			rt5682_dai, ARRAY_SIZE(rt5682_dai));
-}
-
-static int rt5682_i2c_remove(struct i2c_client *i2c)
-{
-	snd_soc_unregister_component(&i2c->dev);
-
-	return 0;
+	return devm_snd_soc_register_component(&i2c->dev,
+					&soc_component_dev_rt5682,
+					rt5682_dai, ARRAY_SIZE(rt5682_dai));
 }
 
 static void rt5682_i2c_shutdown(struct i2c_client *client)
@@ -2703,7 +2697,6 @@ static struct i2c_driver rt5682_i2c_driver = {
 		.acpi_match_table = ACPI_PTR(rt5682_acpi_match),
 	},
 	.probe = rt5682_i2c_probe,
-	.remove = rt5682_i2c_remove,
 	.shutdown = rt5682_i2c_shutdown,
 	.id_table = rt5682_i2c_id,
 };
Signature · 1 line
2.20.1
#19 lore raw

PATCH v2 12/23 ASoC: ak4118: use devm_snd_soc_register_component()

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

We have devm_xxx version of snd_soc_register_component, let's use it.

This patch also removes related empty functions

---
v1 -> v2

- remove empty functions

 sound/soc/codecs/ak4118.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
sound/soc/codecs/ak4118.c +2 -9
index ce419e8..f44d9a4 100644
@@ -400,14 +400,8 @@ static int ak4118_i2c_probe(struct i2c_client *i2c,
 		return ret;
 	}
 
-	return snd_soc_register_component(&i2c->dev, &soc_component_drv_ak4118,
-					  &ak4118_dai, 1);
-}
-
-static int ak4118_i2c_remove(struct i2c_client *i2c)
-{
-	snd_soc_unregister_component(&i2c->dev);
-	return 0;
+	return devm_snd_soc_register_component(&i2c->dev,
+				&soc_component_drv_ak4118, &ak4118_dai, 1);
 }
 
 static const struct of_device_id ak4118_of_match[] = {
@@ -429,7 +423,6 @@ static struct i2c_driver ak4118_i2c_driver = {
 	},
 	.id_table = ak4118_id_table,
 	.probe  = ak4118_i2c_probe,
-	.remove = ak4118_i2c_remove,
 };
 
 module_i2c_driver(ak4118_i2c_driver);
Signature · 1 line
2.7.4
maintainer
#20 lore raw

Applied "ASoC: ak4118: use devm_snd_soc_register_component()" to the asoc tree

The patch

ASoC: ak4118: use devm_snd_soc_register_component()

has been applied to the asoc tree at

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

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

Quoted 1 line

From 35407f9ffd84560501f72ee3954344f8e5b49264 Mon Sep 17 00:00:00 2001

From: Kuninori Morimoto <[email protected]>
Date: Fri, 28 Jun 2019 13:09:40 +0900
Subject: [PATCH] ASoC: ak4118: use devm_snd_soc_register_component()

We have devm_xxx version of snd_soc_register_component, let's use it.

This patch also removes related empty functions

---
 sound/soc/codecs/ak4118.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
sound/soc/codecs/ak4118.c +2 -9
index ce419e8cf890..f44d9a4a8507 100644
@@ -400,14 +400,8 @@ static int ak4118_i2c_probe(struct i2c_client *i2c,
 		return ret;
 	}
 
-	return snd_soc_register_component(&i2c->dev, &soc_component_drv_ak4118,
-					  &ak4118_dai, 1);
-}
-
-static int ak4118_i2c_remove(struct i2c_client *i2c)
-{
-	snd_soc_unregister_component(&i2c->dev);
-	return 0;
+	return devm_snd_soc_register_component(&i2c->dev,
+				&soc_component_drv_ak4118, &ak4118_dai, 1);
 }
 
 static const struct of_device_id ak4118_of_match[] = {
@@ -429,7 +423,6 @@ static struct i2c_driver ak4118_i2c_driver = {
 	},
 	.id_table = ak4118_id_table,
 	.probe  = ak4118_i2c_probe,
-	.remove = ak4118_i2c_remove,
 };
 
 module_i2c_driver(ak4118_i2c_driver);
Signature · 1 line
2.20.1
#21 lore raw

PATCH v2 13/23 ASoC: cros_ec_codec: use devm_snd_soc_register_component()

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

We have devm_xxx version of snd_soc_register_component, let's use it.

---
v1 -> v2

- no change

 sound/soc/codecs/cros_ec_codec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/cros_ec_codec.c +1 -1
index 99a3af8..0ac3e52 100644
@@ -413,7 +413,7 @@ static int cros_ec_codec_platform_probe(struct platform_device *pd)
 
 	platform_set_drvdata(pd, codec_data);
 
-	return snd_soc_register_component(dev, &cros_ec_component_driver,
+	return devm_snd_soc_register_component(dev, &cros_ec_component_driver,
 					  cros_ec_dai, ARRAY_SIZE(cros_ec_dai));
 }
 
Signature · 1 line
2.7.4
maintainer
#22 lore raw

Applied "ASoC: cros_ec_codec: use devm_snd_soc_register_component()" to the asoc tree

The patch

ASoC: cros_ec_codec: use devm_snd_soc_register_component()

has been applied to the asoc tree at

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

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

Quoted 1 line

From dcbe6ed32e06b7811e082806a9c0f84d3a238d18 Mon Sep 17 00:00:00 2001

From: Kuninori Morimoto <[email protected]>
Date: Fri, 28 Jun 2019 13:09:50 +0900
Subject: [PATCH] ASoC: cros_ec_codec: use devm_snd_soc_register_component()

We have devm_xxx version of snd_soc_register_component, let's use it.

---
 sound/soc/codecs/cros_ec_codec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/cros_ec_codec.c +1 -1
index 99a3af8a15ff..0ac3e520653f 100644
@@ -413,7 +413,7 @@ static int cros_ec_codec_platform_probe(struct platform_device *pd)
 
 	platform_set_drvdata(pd, codec_data);
 
-	return snd_soc_register_component(dev, &cros_ec_component_driver,
+	return devm_snd_soc_register_component(dev, &cros_ec_component_driver,
 					  cros_ec_dai, ARRAY_SIZE(cros_ec_dai));
 }
 
Signature · 1 line
2.20.1
#23 lore raw

PATCH v2 14/23 ASoC: fsl: imx-ssi.c: use devm_snd_soc_register_component()

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

We have devm_xxx version of snd_soc_register_component, let's use it.

---
v1 -> v2

- no change

 sound/soc/fsl/imx-ssi.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
sound/soc/fsl/imx-ssi.c +2 -6
index 9038b61..24b2908 100644
@@ -586,7 +586,7 @@ static int imx_ssi_probe(struct platform_device *pdev)
 		goto failed_register;
 	}
 
-	ret = snd_soc_register_component(&pdev->dev, &imx_component,
+	ret = devm_snd_soc_register_component(&pdev->dev, &imx_component,
 					 dai, 1);
 	if (ret) {
 		dev_err(&pdev->dev, "register DAI failed\n");
@@ -603,13 +603,11 @@ static int imx_ssi_probe(struct platform_device *pdev)
 
 	if (ssi->fiq_init && ssi->dma_init) {
 		ret = ssi->fiq_init;
-		goto failed_pcm;
+		goto failed_register;
 	}
 
 	return 0;
 
-failed_pcm:
-	snd_soc_unregister_component(&pdev->dev);
 failed_register:
 	clk_disable_unprepare(ssi->clk);
 failed_clk:
@@ -625,8 +623,6 @@ static int imx_ssi_remove(struct platform_device *pdev)
 	if (!ssi->fiq_init)
 		imx_pcm_fiq_exit(pdev);
 
-	snd_soc_unregister_component(&pdev->dev);
-
 	if (ssi->flags & IMX_SSI_USE_AC97)
 		ac97_ssi = NULL;
 
Signature · 1 line
2.7.4
#24 lore raw

PATCH v2 15/23 ASoC: fsl: mpc5200_psc_i2s.c: use devm_snd_soc_register_component()

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

We have devm_xxx version of snd_soc_register_component, let's use it.

---
v1 -> v2

- no change

 sound/soc/fsl/mpc5200_psc_i2s.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/fsl/mpc5200_psc_i2s.c +1 -2
index 9bc01f3..80902a2 100644
@@ -166,7 +166,7 @@ static int psc_i2s_of_probe(struct platform_device *op)
 	if (rc != 0)
 		return rc;
 
-	rc = snd_soc_register_component(&op->dev, &psc_i2s_component,
+	rc = devm_snd_soc_register_component(&op->dev, &psc_i2s_component,
 					psc_i2s_dai, ARRAY_SIZE(psc_i2s_dai));
 	if (rc != 0) {
 		pr_err("Failed to register DAI\n");
@@ -212,7 +212,6 @@ static int psc_i2s_of_probe(struct platform_device *op)
 static int psc_i2s_of_remove(struct platform_device *op)
 {
 	mpc5200_audio_dma_destroy(op);
-	snd_soc_unregister_component(&op->dev);
 	return 0;
 }
 
Signature · 1 line
2.7.4
#25 lore raw

PATCH v2 16/23 ASoC: fsl: mpc5200_psc_ac97.c: use devm_snd_soc_register_component()

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

We have devm_xxx version of snd_soc_register_component, let's use it.

---
v1 -> v2

- no change

 sound/soc/fsl/mpc5200_psc_ac97.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/fsl/mpc5200_psc_ac97.c +1 -2
index e5b9c04d..4a86e6c 100644
@@ -290,7 +290,7 @@ static int psc_ac97_of_probe(struct platform_device *op)
 		return rc;
 	}
 
-	rc = snd_soc_register_component(&op->dev, &psc_ac97_component,
+	rc = devm_snd_soc_register_component(&op->dev, &psc_ac97_component,
 					psc_ac97_dai, ARRAY_SIZE(psc_ac97_dai));
 	if (rc != 0) {
 		dev_err(&op->dev, "Failed to register DAI\n");
@@ -316,7 +316,6 @@ static int psc_ac97_of_probe(struct platform_device *op)
 static int psc_ac97_of_remove(struct platform_device *op)
 {
 	mpc5200_audio_dma_destroy(op);
-	snd_soc_unregister_component(&op->dev);
 	snd_soc_set_ac97_ops(NULL);
 	return 0;
 }
Signature · 1 line
2.7.4
#26 lore raw

PATCH v2 17/23 ASoC: pxa: pxa2xx-ac97.c: use devm_snd_soc_register_component()

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

We have devm_xxx version of snd_soc_register_component, let's use it.

---
v1 -> v2

- no change

 sound/soc/pxa/pxa2xx-ac97.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/pxa/pxa2xx-ac97.c +1 -2
index 687a8f1f..bf28187 100644
@@ -250,7 +250,7 @@ static int pxa2xx_ac97_dev_probe(struct platform_device *pdev)
 	 * driver to do interesting things with the clocking to get us up
 	 * and running.
 	 */
-	return snd_soc_register_component(&pdev->dev, &pxa_ac97_component,
+	return devm_snd_soc_register_component(&pdev->dev, &pxa_ac97_component,
 					  pxa_ac97_dai_driver, ARRAY_SIZE(pxa_ac97_dai_driver));
 }
 
@@ -258,7 +258,6 @@ static int pxa2xx_ac97_dev_remove(struct platform_device *pdev)
 {
 	struct ac97_controller *ctrl = platform_get_drvdata(pdev);
 
-	snd_soc_unregister_component(&pdev->dev);
 	snd_ac97_controller_unregister(ctrl);
 	pxa2xx_ac97_hw_remove(pdev);
 	return 0;
Signature · 1 line
2.7.4
maintainer
#27 lore raw

Applied "ASoC: pxa: pxa2xx-ac97.c: use devm_snd_soc_register_component()" to the asoc tree

The patch

ASoC: pxa: pxa2xx-ac97.c: use devm_snd_soc_register_component()

has been applied to the asoc tree at

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

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

Quoted 1 line

From 4b9b73b86571e8a03fb09232ff72177e66bf9ef9 Mon Sep 17 00:00:00 2001

From: Kuninori Morimoto <[email protected]>
Date: Fri, 28 Jun 2019 13:10:31 +0900
Subject: [PATCH] ASoC: pxa: pxa2xx-ac97.c: use
devm_snd_soc_register_component()

We have devm_xxx version of snd_soc_register_component, let's use it.

---
 sound/soc/pxa/pxa2xx-ac97.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/pxa/pxa2xx-ac97.c +1 -2
index 687a8f1f9e0d..bf28187315db 100644
@@ -250,7 +250,7 @@ static int pxa2xx_ac97_dev_probe(struct platform_device *pdev)
 	 * driver to do interesting things with the clocking to get us up
 	 * and running.
 	 */
-	return snd_soc_register_component(&pdev->dev, &pxa_ac97_component,
+	return devm_snd_soc_register_component(&pdev->dev, &pxa_ac97_component,
 					  pxa_ac97_dai_driver, ARRAY_SIZE(pxa_ac97_dai_driver));
 }
 
@@ -258,7 +258,6 @@ static int pxa2xx_ac97_dev_remove(struct platform_device *pdev)
 {
 	struct ac97_controller *ctrl = platform_get_drvdata(pdev);
 
-	snd_soc_unregister_component(&pdev->dev);
 	snd_ac97_controller_unregister(ctrl);
 	pxa2xx_ac97_hw_remove(pdev);
 	return 0;
Signature · 1 line
2.20.1
#28 lore raw

PATCH v2 18/23 ASoC: tegra: tegra20_i2s.c: use devm_snd_soc_register_component()

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

We have devm_xxx version of snd_soc_register_component, let's use it.

---
v1 -> v2

- no change

 sound/soc/tegra/tegra20_i2s.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
sound/soc/tegra/tegra20_i2s.c +3 -7
index fd94911..14f55ca 100644
@@ -376,8 +376,8 @@ static int tegra20_i2s_platform_probe(struct platform_device *pdev)
 			goto err_pm_disable;
 	}
 
-	ret = snd_soc_register_component(&pdev->dev, &tegra20_i2s_component,
-					 &i2s->dai, 1);
+	ret = devm_snd_soc_register_component(&pdev->dev,
+				&tegra20_i2s_component, &i2s->dai, 1);
 	if (ret) {
 		dev_err(&pdev->dev, "Could not register DAI: %d\n", ret);
 		ret = -ENOMEM;
@@ -387,13 +387,11 @@ static int tegra20_i2s_platform_probe(struct platform_device *pdev)
 	ret = tegra_pcm_platform_register(&pdev->dev);
 	if (ret) {
 		dev_err(&pdev->dev, "Could not register PCM: %d\n", ret);
-		goto err_unregister_component;
+		goto err_suspend;
 	}
 
 	return 0;
 
-err_unregister_component:
-	snd_soc_unregister_component(&pdev->dev);
 err_suspend:
 	if (!pm_runtime_status_suspended(&pdev->dev))
 		tegra20_i2s_runtime_suspend(&pdev->dev);
@@ -413,8 +411,6 @@ static int tegra20_i2s_platform_remove(struct platform_device *pdev)
 	if (!pm_runtime_status_suspended(&pdev->dev))
 		tegra20_i2s_runtime_suspend(&pdev->dev);
 
-	snd_soc_unregister_component(&pdev->dev);
-
 	clk_put(i2s->clk_i2s);
 
 	return 0;
Signature · 1 line
2.7.4
maintainer
#29 lore raw

Re: [PATCH v2 18/23] ASoC: tegra: tegra20_i2s.c: use devm_snd_soc_register_component()

sound/soc/tegra/tegra20_i2s.c static int tegra20_i2s_platform_remove(struct platform_device *pdev) · line 414

Quoted 6 lines · Kuninori Morimoto
sound/soc/tegra/tegra20_i2s.c +0 -2
 	if (!pm_runtime_status_suspended(&pdev->dev))
 		tegra20_i2s_runtime_suspend(&pdev->dev);
 
-	snd_soc_unregister_component(&pdev->dev);
-
 	clk_put(i2s->clk_i2s);

Same thing with clk_get() here and for some of the others.

#30 lore raw

PATCH v2 19/23 ASoC: tegra: tegra20_spdif.c: use devm_snd_soc_register_component()

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

We have devm_xxx version of snd_soc_register_component, let's use it.

---
v1 -> v2

- no change

 sound/soc/tegra/tegra20_spdif.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
sound/soc/tegra/tegra20_spdif.c +4 -7
index cde526d..b1d4890 100644
@@ -300,8 +300,9 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev)
 			goto err_pm_disable;
 	}
 
-	ret = snd_soc_register_component(&pdev->dev, &tegra20_spdif_component,
-					 &tegra20_spdif_dai, 1);
+	ret = devm_snd_soc_register_component(&pdev->dev,
+					      &tegra20_spdif_component,
+					      &tegra20_spdif_dai, 1);
 	if (ret) {
 		dev_err(&pdev->dev, "Could not register DAI: %d\n", ret);
 		ret = -ENOMEM;
@@ -311,13 +312,11 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev)
 	ret = tegra_pcm_platform_register(&pdev->dev);
 	if (ret) {
 		dev_err(&pdev->dev, "Could not register PCM: %d\n", ret);
-		goto err_unregister_component;
+		goto err_suspend;
 	}
 
 	return 0;
 
-err_unregister_component:
-	snd_soc_unregister_component(&pdev->dev);
 err_suspend:
 	if (!pm_runtime_status_suspended(&pdev->dev))
 		tegra20_spdif_runtime_suspend(&pdev->dev);
@@ -333,8 +332,6 @@ static int tegra20_spdif_platform_remove(struct platform_device *pdev)
 	if (!pm_runtime_status_suspended(&pdev->dev))
 		tegra20_spdif_runtime_suspend(&pdev->dev);
 
-	snd_soc_unregister_component(&pdev->dev);
-
 	return 0;
 }
 
Signature · 1 line
2.7.4
#31 lore raw

PATCH v2 20/23 ASoC: tegra: tegra20_ac97.c: use devm_snd_soc_register_component()

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

We have devm_xxx version of snd_soc_register_component, let's use it.

---
v1 -> v2

- no change

 sound/soc/tegra/tegra20_ac97.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
sound/soc/tegra/tegra20_ac97.c +3 -7
index 7c359c4..ae94db4 100644
@@ -377,8 +377,8 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
 		goto err_clk_disable_unprepare;
 	}
 
-	ret = snd_soc_register_component(&pdev->dev, &tegra20_ac97_component,
-					 &tegra20_ac97_dai, 1);
+	ret = devm_snd_soc_register_component(&pdev->dev,
+				&tegra20_ac97_component, &tegra20_ac97_dai, 1);
 	if (ret) {
 		dev_err(&pdev->dev, "Could not register DAI: %d\n", ret);
 		ret = -ENOMEM;
@@ -388,7 +388,7 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
 	ret = tegra_pcm_platform_register(&pdev->dev);
 	if (ret) {
 		dev_err(&pdev->dev, "Could not register PCM: %d\n", ret);
-		goto err_unregister_component;
+		goto err_clk_disable_unprepare;
 	}
 
 	/* XXX: crufty ASoC AC97 API - only one AC97 codec allowed */
@@ -396,8 +396,6 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
 
 	return 0;
 
-err_unregister_component:
-	snd_soc_unregister_component(&pdev->dev);
 err_clk_disable_unprepare:
 	clk_disable_unprepare(ac97->clk_ac97);
 err_clk_put:
@@ -410,8 +408,6 @@ static int tegra20_ac97_platform_remove(struct platform_device *pdev)
 {
 	struct tegra20_ac97 *ac97 = dev_get_drvdata(&pdev->dev);
 
-	snd_soc_unregister_component(&pdev->dev);
-
 	clk_disable_unprepare(ac97->clk_ac97);
 
 	snd_soc_set_ac97_ops(NULL);
Signature · 1 line
2.7.4
#32 lore raw

PATCH v2 21/23 ASoC: tegra: tegra30_i2s.c: use devm_snd_soc_register_component()

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

We have devm_xxx version of snd_soc_register_component, let's use it.

---
v1 -> v2

- no change

 sound/soc/tegra/tegra30_i2s.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
sound/soc/tegra/tegra30_i2s.c +3 -7
index 2f70bf0..7d9e1e4 100644
@@ -463,8 +463,8 @@ static int tegra30_i2s_platform_probe(struct platform_device *pdev)
 		goto err_free_rx_fifo;
 	}
 
-	ret = snd_soc_register_component(&pdev->dev, &tegra30_i2s_component,
-				   &i2s->dai, 1);
+	ret = devm_snd_soc_register_component(&pdev->dev,
+					&tegra30_i2s_component, &i2s->dai, 1);
 	if (ret) {
 		dev_err(&pdev->dev, "Could not register DAI: %d\n", ret);
 		ret = -ENOMEM;
@@ -476,13 +476,11 @@ static int tegra30_i2s_platform_probe(struct platform_device *pdev)
 				i2s->capture_dma_chan);
 	if (ret) {
 		dev_err(&pdev->dev, "Could not register PCM: %d\n", ret);
-		goto err_unregister_component;
+		goto err_unroute_rx_fifo;
 	}
 
 	return 0;
 
-err_unregister_component:
-	snd_soc_unregister_component(&pdev->dev);
 err_unroute_rx_fifo:
 	tegra30_ahub_unset_rx_cif_source(i2s->capture_fifo_cif);
 err_free_rx_fifo:
@@ -510,8 +508,6 @@ static int tegra30_i2s_platform_remove(struct platform_device *pdev)
 	if (!pm_runtime_status_suspended(&pdev->dev))
 		tegra30_i2s_runtime_suspend(&pdev->dev);
 
-	snd_soc_unregister_component(&pdev->dev);
-
 	tegra30_ahub_unset_rx_cif_source(i2s->capture_fifo_cif);
 	tegra30_ahub_free_rx_fifo(i2s->capture_fifo_cif);
 
Signature · 1 line
2.7.4
#33 lore raw

PATCH v2 22/23 ASoC: ti: davinci-i2s.c: use devm_snd_soc_register_component()

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

We have devm_xxx version of snd_soc_register_component, let's use it.

---
v1 -> v2

- no change

 sound/soc/ti/davinci-i2s.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
sound/soc/ti/davinci-i2s.c +2 -6
index 92c1bdc..67b8538 100644
@@ -723,7 +723,7 @@ static int davinci_i2s_probe(struct platform_device *pdev)
 	dev->dev = &pdev->dev;
 	dev_set_drvdata(&pdev->dev, dev);
 
-	ret = snd_soc_register_component(&pdev->dev, &davinci_i2s_component,
+	ret = devm_snd_soc_register_component(&pdev->dev, &davinci_i2s_component,
 					 &davinci_i2s_dai, 1);
 	if (ret != 0)
 		goto err_release_clk;
@@ -731,13 +731,11 @@ static int davinci_i2s_probe(struct platform_device *pdev)
 	ret = edma_pcm_platform_register(&pdev->dev);
 	if (ret) {
 		dev_err(&pdev->dev, "register PCM failed: %d\n", ret);
-		goto err_unregister_component;
+		goto err_release_clk;
 	}
 
 	return 0;
 
-err_unregister_component:
-	snd_soc_unregister_component(&pdev->dev);
 err_release_clk:
 	clk_disable(dev->clk);
 	clk_put(dev->clk);
@@ -748,8 +746,6 @@ static int davinci_i2s_remove(struct platform_device *pdev)
 {
 	struct davinci_mcbsp_dev *dev = dev_get_drvdata(&pdev->dev);
 
-	snd_soc_unregister_component(&pdev->dev);
-
 	clk_disable(dev->clk);
 	clk_put(dev->clk);
 	dev->clk = NULL;
Signature · 1 line
2.7.4
#34 lore raw

PATCH v2 23/23 ASoC: ux500: ux500_msp_dai.c: use devm_snd_soc_register_component()

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

We have devm_xxx version of snd_soc_register_component, let's use it.

---
v1 -> v2

- no change

 sound/soc/ux500/ux500_msp_dai.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
sound/soc/ux500/ux500_msp_dai.c +2 -8
index 35669b7..131f09e 100644
@@ -800,7 +800,7 @@ static int ux500_msp_drv_probe(struct platform_device *pdev)
 	}
 	dev_set_drvdata(&pdev->dev, drvdata);
 
-	ret = snd_soc_register_component(&pdev->dev, &ux500_msp_component,
+	ret = devm_snd_soc_register_component(&pdev->dev, &ux500_msp_component,
 					 &ux500_msp_dai_drv, 1);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "Error: %s: Failed to register MSP%d!\n",
@@ -813,22 +813,16 @@ static int ux500_msp_drv_probe(struct platform_device *pdev)
 		dev_err(&pdev->dev,
 			"Error: %s: Failed to register PCM platform device!\n",
 			__func__);
-		goto err_reg_plat;
+		return ret;
 	}
 
 	return 0;
-
-err_reg_plat:
-	snd_soc_unregister_component(&pdev->dev);
-	return ret;
 }
 
 static int ux500_msp_drv_remove(struct platform_device *pdev)
 {
 	struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(&pdev->dev);
 
-	snd_soc_unregister_component(&pdev->dev);
-
 	prcmu_qos_remove_requirement(PRCMU_QOS_APE_OPP, "ux500_msp_i2s");
 
 	ux500_msp_i2s_cleanup_msp(pdev, drvdata->msp);
Signature · 1 line
2.7.4