From: Fabio Estevam <festevam@gmail.com>
To: broonie@kernel.org
Cc: nicoleotsuka@gmail.com, Fabio Estevam <fabio.estevam@nxp.com>,
alsa-devel@alsa-project.org, timur@tabi.org
Subject: [PATCH v3 2/2] ASoC: fsl_ssi: Use the tolower() function
Date: Wed, 5 Apr 2017 16:44:06 -0300 [thread overview]
Message-ID: <1491421446-13799-2-git-send-email-festevam@gmail.com> (raw)
In-Reply-To: <1491421446-13799-1-git-send-email-festevam@gmail.com>
From: Fabio Estevam <fabio.estevam@nxp.com>
Code can be simplified by using the standard tolower() funtion.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
Changes since v2:
- None
sound/soc/fsl/fsl_ssi.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 0b74d1c..173cb84 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>
@@ -1315,14 +1316,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,
--
2.7.4
next prev parent reply other threads:[~2017-04-05 19:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-05 19:44 [PATCH v3 1/2] ASoC: fsl_ssi: Remove FSLSSI_I2S_RATES definition Fabio Estevam
2017-04-05 19:44 ` Fabio Estevam [this message]
2017-04-05 19:51 ` [PATCH v3 2/2] ASoC: fsl_ssi: Use the tolower() function Timur Tabi
2017-04-05 19:51 ` [PATCH v3 1/2] ASoC: fsl_ssi: Remove FSLSSI_I2S_RATES definition Timur Tabi
2017-04-10 18:42 ` Applied "ASoC: fsl_ssi: Remove FSLSSI_I2S_RATES definition" to the asoc tree Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1491421446-13799-2-git-send-email-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=fabio.estevam@nxp.com \
--cc=nicoleotsuka@gmail.com \
--cc=timur@tabi.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.