diff options
Diffstat (limited to 'sound/soc/cirrus/ep93xx-ac97.c')
-rw-r--r-- | sound/soc/cirrus/ep93xx-ac97.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/soc/cirrus/ep93xx-ac97.c b/sound/soc/cirrus/ep93xx-ac97.c index 3f4f88877c84..ac73c607410a 100644 --- a/sound/soc/cirrus/ep93xx-ac97.c +++ b/sound/soc/cirrus/ep93xx-ac97.c @@ -237,13 +237,12 @@ static irqreturn_t ep93xx_ac97_interrupt(int irq, void *dev_id) return IRQ_HANDLED; } -struct snd_ac97_bus_ops soc_ac97_ops = { +static struct snd_ac97_bus_ops ep93xx_ac97_ops = { .read = ep93xx_ac97_read, .write = ep93xx_ac97_write, .reset = ep93xx_ac97_cold_reset, .warm_reset = ep93xx_ac97_warm_reset, }; -EXPORT_SYMBOL_GPL(soc_ac97_ops); static int ep93xx_ac97_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) @@ -389,6 +388,10 @@ static int ep93xx_ac97_probe(struct platform_device *pdev) ep93xx_ac97_info = info; platform_set_drvdata(pdev, info); + ret = snd_soc_set_ac97_ops(&ep93xx_ac97_ops); + if (ret) + goto fail; + ret = snd_soc_register_component(&pdev->dev, &ep93xx_ac97_component, &ep93xx_ac97_dai, 1); if (ret) @@ -398,7 +401,7 @@ static int ep93xx_ac97_probe(struct platform_device *pdev) fail: ep93xx_ac97_info = NULL; - dev_set_drvdata(&pdev->dev, NULL); + snd_soc_set_ac97_ops(NULL); return ret; } @@ -412,7 +415,8 @@ static int ep93xx_ac97_remove(struct platform_device *pdev) ep93xx_ac97_write_reg(info, AC97GCR, 0); ep93xx_ac97_info = NULL; - dev_set_drvdata(&pdev->dev, NULL); + + snd_soc_set_ac97_ops(NULL); return 0; } |