Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48ce3ec1 authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branch 'asoc/topic/devm' into asoc-next

parents cf44fba0 4fa8dbc1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -365,6 +365,7 @@ int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source,

int snd_soc_register_card(struct snd_soc_card *card);
int snd_soc_unregister_card(struct snd_soc_card *card);
int devm_snd_soc_register_card(struct device *dev, struct snd_soc_card *card);
int snd_soc_suspend(struct device *dev);
int snd_soc_resume(struct device *dev);
int snd_soc_poweroff(struct device *dev);
@@ -382,6 +383,9 @@ void snd_soc_unregister_codec(struct device *dev);
int snd_soc_register_component(struct device *dev,
			 const struct snd_soc_component_driver *cmpnt_drv,
			 struct snd_soc_dai_driver *dai_drv, int num_dai);
int devm_snd_soc_register_component(struct device *dev,
			 const struct snd_soc_component_driver *cmpnt_drv,
			 struct snd_soc_dai_driver *dai_drv, int num_dai);
void snd_soc_unregister_component(struct device *dev);
int snd_soc_codec_volatile_register(struct snd_soc_codec *codec,
				    unsigned int reg);
+1 −1
Original line number Diff line number Diff line
snd-soc-core-objs := soc-core.o soc-dapm.o soc-jack.o soc-cache.o soc-utils.o
snd-soc-core-objs += soc-pcm.o soc-compress.o soc-io.o
snd-soc-core-objs += soc-pcm.o soc-compress.o soc-io.o soc-devres.o

ifneq ($(CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM),)
snd-soc-core-objs += soc-generic-dmaengine-pcm.o
+3 −11
Original line number Diff line number Diff line
@@ -1172,7 +1172,7 @@ static int fsl_spdif_probe(struct platform_device *pdev)
	/* Register with ASoC */
	dev_set_drvdata(&pdev->dev, spdif_priv);

	ret = snd_soc_register_component(&pdev->dev, &fsl_spdif_component,
	ret = devm_snd_soc_register_component(&pdev->dev, &fsl_spdif_component,
					      &spdif_priv->cpu_dai_drv, 1);
	if (ret) {
		dev_err(&pdev->dev, "failed to register DAI: %d\n", ret);
@@ -1180,15 +1180,8 @@ static int fsl_spdif_probe(struct platform_device *pdev)
	}

	ret = imx_pcm_dma_init(pdev);
	if (ret) {
	if (ret)
		dev_err(&pdev->dev, "imx_pcm_dma_init failed: %d\n", ret);
		goto error_component;
	}

	return ret;

error_component:
	snd_soc_unregister_component(&pdev->dev);

	return ret;
}
@@ -1196,7 +1189,6 @@ static int fsl_spdif_probe(struct platform_device *pdev)
static int fsl_spdif_remove(struct platform_device *pdev)
{
	imx_pcm_dma_exit(pdev);
	snd_soc_unregister_component(&pdev->dev);

	return 0;
}
+1 −2
Original line number Diff line number Diff line
@@ -159,7 +159,7 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
	data->card.dapm_widgets = imx_sgtl5000_dapm_widgets;
	data->card.num_dapm_widgets = ARRAY_SIZE(imx_sgtl5000_dapm_widgets);

	ret = snd_soc_register_card(&data->card);
	ret = devm_snd_soc_register_card(&pdev->dev, &data->card);
	if (ret) {
		dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
		goto fail;
@@ -186,7 +186,6 @@ static int imx_sgtl5000_remove(struct platform_device *pdev)
{
	struct imx_sgtl5000_data *data = platform_get_drvdata(pdev);

	snd_soc_unregister_card(&data->card);
	clk_put(data->codec_clk);

	return 0;
+1 −3
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ static int imx_spdif_audio_probe(struct platform_device *pdev)
	if (ret)
		goto error_dir;

	ret = snd_soc_register_card(&data->card);
	ret = devm_snd_soc_register_card(&pdev->dev, &data->card);
	if (ret) {
		dev_err(&pdev->dev, "snd_soc_register_card failed: %d\n", ret);
		goto error_dir;
@@ -119,8 +119,6 @@ static int imx_spdif_audio_remove(struct platform_device *pdev)
	if (data->txdev)
		platform_device_unregister(data->txdev);

	snd_soc_unregister_card(&data->card);

	return 0;
}

Loading