summaryrefslogtreecommitdiff
path: root/sound/soc/fsl
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@nxp.com>2017-04-05 16:44:06 -0300
committerMark Brown <broonie@kernel.org>2017-04-10 18:49:17 +0100
commitc6682fedee47e3914af366f876728b3f77ba0272 (patch)
tree40344a7d2e00914ab4733d1372e1c886ba6b70a0 /sound/soc/fsl
parent580556774ad33adf427765d560f95f66cb01c295 (diff)
ASoC: fsl_ssi: Use the tolower() function
Code can be simplified by using the standard tolower() funtion. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Acked-by: Timur Tabi <timur@tabi.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/fsl')
-rw-r--r--sound/soc/fsl/fsl_ssi.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 184a47360f84..549a598d030e 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -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,