aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/cirrus
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-06-28 07:36:22 -0400
committerTakashi Iwai <tiwai@suse.de>2013-06-28 07:36:22 -0400
commitaccaf69da1d1e64bd77ac0caad77e4cfc3b654c7 (patch)
tree0402e4fad9cecd428c8c3c228a08f9e31eb63470 /sound/soc/cirrus
parent975cc02a904ae385721f1bdb65eb1bcf707dfaf1 (diff)
parent27516080b21cbcb936440d2a3171867860b9a881 (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/cirrus')
-rw-r--r--sound/soc/cirrus/ep93xx-ac97.c12
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)
237 return IRQ_HANDLED; 237 return IRQ_HANDLED;
238} 238}
239 239
240struct snd_ac97_bus_ops soc_ac97_ops = { 240static struct snd_ac97_bus_ops ep93xx_ac97_ops = {
241 .read = ep93xx_ac97_read, 241 .read = ep93xx_ac97_read,
242 .write = ep93xx_ac97_write, 242 .write = ep93xx_ac97_write,
243 .reset = ep93xx_ac97_cold_reset, 243 .reset = ep93xx_ac97_cold_reset,
244 .warm_reset = ep93xx_ac97_warm_reset, 244 .warm_reset = ep93xx_ac97_warm_reset,
245}; 245};
246EXPORT_SYMBOL_GPL(soc_ac97_ops);
247 246
248static int ep93xx_ac97_trigger(struct snd_pcm_substream *substream, 247static int ep93xx_ac97_trigger(struct snd_pcm_substream *substream,
249 int cmd, struct snd_soc_dai *dai) 248 int cmd, struct snd_soc_dai *dai)
@@ -389,6 +388,10 @@ static int ep93xx_ac97_probe(struct platform_device *pdev)
389 ep93xx_ac97_info = info; 388 ep93xx_ac97_info = info;
390 platform_set_drvdata(pdev, info); 389 platform_set_drvdata(pdev, info);
391 390
391 ret = snd_soc_set_ac97_ops(&ep93xx_ac97_ops);
392 if (ret)
393 goto fail;
394
392 ret = snd_soc_register_component(&pdev->dev, &ep93xx_ac97_component, 395 ret = snd_soc_register_component(&pdev->dev, &ep93xx_ac97_component,
393 &ep93xx_ac97_dai, 1); 396 &ep93xx_ac97_dai, 1);
394 if (ret) 397 if (ret)
@@ -398,7 +401,7 @@ static int ep93xx_ac97_probe(struct platform_device *pdev)
398 401
399fail: 402fail:
400 ep93xx_ac97_info = NULL; 403 ep93xx_ac97_info = NULL;
401 dev_set_drvdata(&pdev->dev, NULL); 404 snd_soc_set_ac97_ops(NULL);
402 return ret; 405 return ret;
403} 406}
404 407
@@ -412,7 +415,8 @@ static int ep93xx_ac97_remove(struct platform_device *pdev)
412 ep93xx_ac97_write_reg(info, AC97GCR, 0); 415 ep93xx_ac97_write_reg(info, AC97GCR, 0);
413 416
414 ep93xx_ac97_info = NULL; 417 ep93xx_ac97_info = NULL;
415 dev_set_drvdata(&pdev->dev, NULL); 418
419 snd_soc_set_ac97_ops(NULL);
416 420
417 return 0; 421 return 0;
418} 422}