]> 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 184a47360f84fad3614bdaf34811cf0f86bdbbe7..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>
@@ -1320,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,