diff options
Diffstat (limited to 'sound/soc/codecs/spdif_transciever.c')
-rw-r--r-- | sound/soc/codecs/spdif_transciever.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sound/soc/codecs/spdif_transciever.c b/sound/soc/codecs/spdif_transciever.c index a63191141052..4c32b54913ad 100644 --- a/sound/soc/codecs/spdif_transciever.c +++ b/sound/soc/codecs/spdif_transciever.c @@ -16,18 +16,21 @@ #include <linux/module.h> #include <linux/moduleparam.h> +#include <linux/slab.h> #include <sound/soc.h> #include <sound/pcm.h> - -#include "spdif_transciever.h" +#include <sound/initval.h> MODULE_LICENSE("GPL"); #define STUB_RATES SNDRV_PCM_RATE_8000_96000 #define STUB_FORMATS SNDRV_PCM_FMTBIT_S16_LE -struct snd_soc_dai dit_stub_dai = { - .name = "DIT", + +static struct snd_soc_codec_driver soc_codec_spdif_dit; + +static struct snd_soc_dai_driver dit_stub_dai = { + .name = "dit-hifi", .playback = { .stream_name = "Playback", .channels_min = 1, @@ -36,17 +39,16 @@ struct snd_soc_dai dit_stub_dai = { .formats = STUB_FORMATS, }, }; -EXPORT_SYMBOL_GPL(dit_stub_dai); static int spdif_dit_probe(struct platform_device *pdev) { - dit_stub_dai.dev = &pdev->dev; - return snd_soc_register_dai(&dit_stub_dai); + return snd_soc_register_codec(&pdev->dev, &soc_codec_spdif_dit, + &dit_stub_dai, 1); } static int spdif_dit_remove(struct platform_device *pdev) { - snd_soc_unregister_dai(&dit_stub_dai); + snd_soc_unregister_codec(&pdev->dev); return 0; } |