soc-utils.c (a0afd4f7c1ff8cb7a9747150500f8ce081fbcfc9) | soc-utils.c (7aca69f9fe8f04ca37a01e2540960c53b24e3223) |
---|---|
1/* 2 * soc-util.c -- ALSA SoC Audio Layer utility functions 3 * 4 * Copyright 2009 Wolfson Microelectronics PLC. 5 * 6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> 7 * Liam Girdwood <lrg@slimlogic.co.uk> 8 * --- 75 unchanged lines hidden (view full) --- 84 .open = dummy_dma_open, 85 .ioctl = snd_pcm_lib_ioctl, 86}; 87 88static struct snd_soc_platform_driver dummy_platform = { 89 .ops = &dummy_dma_ops, 90}; 91 | 1/* 2 * soc-util.c -- ALSA SoC Audio Layer utility functions 3 * 4 * Copyright 2009 Wolfson Microelectronics PLC. 5 * 6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> 7 * Liam Girdwood <lrg@slimlogic.co.uk> 8 * --- 75 unchanged lines hidden (view full) --- 84 .open = dummy_dma_open, 85 .ioctl = snd_pcm_lib_ioctl, 86}; 87 88static struct snd_soc_platform_driver dummy_platform = { 89 .ops = &dummy_dma_ops, 90}; 91 |
92static struct snd_soc_codec_driver dummy_codec; 93static struct snd_soc_dai_driver dummy_dai = { 94 .name = "snd-soc-dummy-dai", 95}; 96 |
|
92static __devinit int snd_soc_dummy_probe(struct platform_device *pdev) 93{ | 97static __devinit int snd_soc_dummy_probe(struct platform_device *pdev) 98{ |
94 return snd_soc_register_platform(&pdev->dev, &dummy_platform); | 99 int ret; 100 101 ret = snd_soc_register_codec(&pdev->dev, &dummy_codec, &dummy_dai, 1); 102 if (ret < 0) 103 return ret; 104 105 ret = snd_soc_register_platform(&pdev->dev, &dummy_platform); 106 if (ret < 0) { 107 snd_soc_unregister_codec(&pdev->dev); 108 return ret; 109 } 110 111 return ret; |
95} 96 97static __devexit int snd_soc_dummy_remove(struct platform_device *pdev) 98{ 99 snd_soc_unregister_platform(&pdev->dev); | 112} 113 114static __devexit int snd_soc_dummy_remove(struct platform_device *pdev) 115{ 116 snd_soc_unregister_platform(&pdev->dev); |
117 snd_soc_unregister_codec(&pdev->dev); |
|
100 101 return 0; 102} 103 104static struct platform_driver soc_dummy_driver = { 105 .driver = { 106 .name = "snd-soc-dummy", 107 .owner = THIS_MODULE, --- 33 unchanged lines hidden --- | 118 119 return 0; 120} 121 122static struct platform_driver soc_dummy_driver = { 123 .driver = { 124 .name = "snd-soc-dummy", 125 .owner = THIS_MODULE, --- 33 unchanged lines hidden --- |