]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - sound/soc/fsl/fsl_ssi.c
ASoC: fsl_ssi: Use the tolower() function
[karo-tx-linux.git] / sound / soc / fsl / fsl_ssi.c
index 50349437d9615107a3a08fa481b6b2d61612e51c..549a598d030ee8b56deb6575f58557b70ded8155 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/clk.h>
+#include <linux/ctype.h>
 #include <linux/device.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include "fsl_ssi.h"
 #include "imx-pcm.h"
 
-/**
- * FSLSSI_I2S_RATES: sample rates supported by the I2S
- *
- * This driver currently only supports the SSI running in I2S slave mode,
- * which means the codec determines the sample rate.  Therefore, we tell
- * ALSA that we support all rates and let the codec driver decide what rates
- * are really supported.
- */
-#define FSLSSI_I2S_RATES SNDRV_PCM_RATE_CONTINUOUS
-
 /**
  * FSLSSI_I2S_FORMATS: audio formats supported by the SSI
  *
@@ -1217,14 +1208,14 @@ static struct snd_soc_dai_driver fsl_ssi_dai_template = {
                .stream_name = "CPU-Playback",
                .channels_min = 1,
                .channels_max = 32,
-               .rates = FSLSSI_I2S_RATES,
+               .rates = SNDRV_PCM_RATE_CONTINUOUS,
                .formats = FSLSSI_I2S_FORMATS,
        },
        .capture = {
                .stream_name = "CPU-Capture",
                .channels_min = 1,
                .channels_max = 32,
-               .rates = FSLSSI_I2S_RATES,
+               .rates = SNDRV_PCM_RATE_CONTINUOUS,
                .formats = FSLSSI_I2S_FORMATS,
        },
        .ops = &fsl_ssi_dai_ops,
@@ -1330,14 +1321,10 @@ static struct snd_ac97_bus_ops fsl_ssi_ac97_ops = {
  */
 static void make_lowercase(char *s)
 {
-       char *p = s;
-       char c;
-
-       while ((c = *p)) {
-               if ((c >= 'A') && (c <= 'Z'))
-                       *p = c + ('a' - 'A');
-               p++;
-       }
+       if (!s)
+               return;
+       for (; *s; s++)
+               *s = tolower(*s);
 }
 
 static int fsl_ssi_imx_probe(struct platform_device *pdev,