diff options
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 a8362be3cd18..51be3772cba9 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) | |||
501 | imx_ssi_ac97_read(ac97, 0); | 501 | imx_ssi_ac97_read(ac97, 0); |
502 | } | 502 | } |
503 | 503 | ||
504 | struct snd_ac97_bus_ops soc_ac97_ops = { | 504 | static struct snd_ac97_bus_ops imx_ssi_ac97_ops = { |
505 | .read = imx_ssi_ac97_read, | 505 | .read = imx_ssi_ac97_read, |
506 | .write = imx_ssi_ac97_write, | 506 | .write = imx_ssi_ac97_write, |
507 | .reset = imx_ssi_ac97_reset, | 507 | .reset = imx_ssi_ac97_reset, |
508 | .warm_reset = imx_ssi_ac97_warm_reset | 508 | .warm_reset = imx_ssi_ac97_warm_reset |
509 | }; | 509 | }; |
510 | EXPORT_SYMBOL_GPL(soc_ac97_ops); | ||
511 | 510 | ||
512 | static int imx_ssi_probe(struct platform_device *pdev) | 511 | static int imx_ssi_probe(struct platform_device *pdev) |
513 | { | 512 | { |
@@ -583,6 +582,12 @@ static int imx_ssi_probe(struct platform_device *pdev) | |||
583 | 582 | ||
584 | platform_set_drvdata(pdev, ssi); | 583 | platform_set_drvdata(pdev, ssi); |
585 | 584 | ||
585 | ret = snd_soc_set_ac97_ops(&imx_ssi_ac97_ops); | ||
586 | if (ret != 0) { | ||
587 | dev_err(&pdev->dev, "Failed to set AC'97 ops: %d\n", ret); | ||
588 | goto failed_register; | ||
589 | } | ||
590 | |||
586 | ret = snd_soc_register_component(&pdev->dev, &imx_component, | 591 | ret = snd_soc_register_component(&pdev->dev, &imx_component, |
587 | dai, 1); | 592 | dai, 1); |
588 | if (ret) { | 593 | if (ret) { |
@@ -608,6 +613,7 @@ failed_register: | |||
608 | release_mem_region(res->start, resource_size(res)); | 613 | release_mem_region(res->start, resource_size(res)); |
609 | clk_disable_unprepare(ssi->clk); | 614 | clk_disable_unprepare(ssi->clk); |
610 | failed_clk: | 615 | failed_clk: |
616 | snd_soc_set_ac97_ops(NULL); | ||
611 | 617 | ||
612 | return ret; | 618 | return ret; |
613 | } | 619 | } |
@@ -627,6 +633,7 @@ static int imx_ssi_remove(struct platform_device *pdev) | |||
627 | 633 | ||
628 | release_mem_region(res->start, resource_size(res)); | 634 | release_mem_region(res->start, resource_size(res)); |
629 | clk_disable_unprepare(ssi->clk); | 635 | clk_disable_unprepare(ssi->clk); |
636 | snd_soc_set_ac97_ops(NULL); | ||
630 | 637 | ||
631 | return 0; | 638 | return 0; |
632 | } | 639 | } |