diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-06-28 13:36:22 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-06-28 13:36:22 +0200 |
commit | accaf69da1d1e64bd77ac0caad77e4cfc3b654c7 (patch) | |
tree | 0402e4fad9cecd428c8c3c228a08f9e31eb63470 /sound/soc/fsl/imx-ssi.c | |
parent | 975cc02a904ae385721f1bdb65eb1bcf707dfaf1 (diff) | |
parent | 27516080b21cbcb936440d2a3171867860b9a881 (diff) |
Merge tag 'asoc-v3.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: More updates for v3.11
Some more fixes and enhancements, and also a bunch of refectoring for
AC'97 support which enables more than one AC'97 controller driver to be
built in.
Diffstat (limited to 'sound/soc/fsl/imx-ssi.c')
-rw-r--r-- | sound/soc/fsl/imx-ssi.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c index a8362be3cd1..51be3772cba 100644 --- a/sound/soc/fsl/imx-ssi.c +++ b/sound/soc/fsl/imx-ssi.c @@ -501,13 +501,12 @@ static void imx_ssi_ac97_warm_reset(struct snd_ac97 *ac97) imx_ssi_ac97_read(ac97, 0); } -struct snd_ac97_bus_ops soc_ac97_ops = { +static struct snd_ac97_bus_ops imx_ssi_ac97_ops = { .read = imx_ssi_ac97_read, .write = imx_ssi_ac97_write, .reset = imx_ssi_ac97_reset, .warm_reset = imx_ssi_ac97_warm_reset }; -EXPORT_SYMBOL_GPL(soc_ac97_ops); static int imx_ssi_probe(struct platform_device *pdev) { @@ -583,6 +582,12 @@ static int imx_ssi_probe(struct platform_device *pdev) platform_set_drvdata(pdev, ssi); + ret = snd_soc_set_ac97_ops(&imx_ssi_ac97_ops); + if (ret != 0) { + dev_err(&pdev->dev, "Failed to set AC'97 ops: %d\n", ret); + goto failed_register; + } + ret = snd_soc_register_component(&pdev->dev, &imx_component, dai, 1); if (ret) { @@ -608,6 +613,7 @@ failed_register: release_mem_region(res->start, resource_size(res)); clk_disable_unprepare(ssi->clk); failed_clk: + snd_soc_set_ac97_ops(NULL); return ret; } @@ -627,6 +633,7 @@ static int imx_ssi_remove(struct platform_device *pdev) release_mem_region(res->start, resource_size(res)); clk_disable_unprepare(ssi->clk); + snd_soc_set_ac97_ops(NULL); return 0; } |