]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/soc/atmel/atmel_ssc_dai.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
[linux-2.6-omap-h63xx.git] / sound / soc / atmel / atmel_ssc_dai.c
index ff0054b765028062bb0040985777969f940fe6fd..e588e63f18d205e6e7f1d118b4982711f867cd51 100644 (file)
@@ -697,6 +697,15 @@ static int atmel_ssc_resume(struct snd_soc_dai *cpu_dai)
 #define ATMEL_SSC_FORMATS (SNDRV_PCM_FMTBIT_S8     | SNDRV_PCM_FMTBIT_S16_LE |\
                          SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
 
+static struct snd_soc_dai_ops atmel_ssc_dai_ops = {
+       .startup        = atmel_ssc_startup,
+       .shutdown       = atmel_ssc_shutdown,
+       .prepare        = atmel_ssc_prepare,
+       .hw_params      = atmel_ssc_hw_params,
+       .set_fmt        = atmel_ssc_set_dai_fmt,
+       .set_clkdiv     = atmel_ssc_set_dai_clkdiv,
+};
+
 struct snd_soc_dai atmel_ssc_dai[NUM_SSC_DEVICES] = {
        {       .name = "atmel-ssc0",
                .id = 0,
@@ -712,13 +721,7 @@ struct snd_soc_dai atmel_ssc_dai[NUM_SSC_DEVICES] = {
                        .channels_max = 2,
                        .rates = ATMEL_SSC_RATES,
                        .formats = ATMEL_SSC_FORMATS,},
-               .ops = {
-                       .startup = atmel_ssc_startup,
-                       .shutdown = atmel_ssc_shutdown,
-                       .prepare = atmel_ssc_prepare,
-                       .hw_params = atmel_ssc_hw_params,
-                       .set_fmt = atmel_ssc_set_dai_fmt,
-                       .set_clkdiv = atmel_ssc_set_dai_clkdiv,},
+               .ops = &atmel_ssc_dai_ops,
                .private_data = &ssc_info[0],
        },
 #if NUM_SSC_DEVICES == 3
@@ -736,13 +739,7 @@ struct snd_soc_dai atmel_ssc_dai[NUM_SSC_DEVICES] = {
                        .channels_max = 2,
                        .rates = ATMEL_SSC_RATES,
                        .formats = ATMEL_SSC_FORMATS,},
-               .ops = {
-                       .startup = atmel_ssc_startup,
-                       .shutdown = atmel_ssc_shutdown,
-                       .prepare = atmel_ssc_prepare,
-                       .hw_params = atmel_ssc_hw_params,
-                       .set_fmt = atmel_ssc_set_dai_fmt,
-                       .set_clkdiv = atmel_ssc_set_dai_clkdiv,},
+               .ops = &atmel_ssc_dai_ops,
                .private_data = &ssc_info[1],
        },
        {       .name = "atmel-ssc2",
@@ -759,13 +756,7 @@ struct snd_soc_dai atmel_ssc_dai[NUM_SSC_DEVICES] = {
                        .channels_max = 2,
                        .rates = ATMEL_SSC_RATES,
                        .formats = ATMEL_SSC_FORMATS,},
-               .ops = {
-                       .startup = atmel_ssc_startup,
-                       .shutdown = atmel_ssc_shutdown,
-                       .prepare = atmel_ssc_prepare,
-                       .hw_params = atmel_ssc_hw_params,
-                       .set_fmt = atmel_ssc_set_dai_fmt,
-                       .set_clkdiv = atmel_ssc_set_dai_clkdiv,},
+               .ops = &atmel_ssc_dai_ops,
                .private_data = &ssc_info[2],
        },
 #endif