From patchwork Wed Apr 5 19:44:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 9665547 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C53E2602B5 for ; Wed, 5 Apr 2017 19:45:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3664281AA for ; Wed, 5 Apr 2017 19:45:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A81662856A; Wed, 5 Apr 2017 19:45:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 03A9A281AA for ; Wed, 5 Apr 2017 19:45:16 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 6F97D2671EB; Wed, 5 Apr 2017 21:45:05 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id C635A2671D3; Wed, 5 Apr 2017 21:45:02 +0200 (CEST) Received: from mail-qt0-f196.google.com (mail-qt0-f196.google.com [209.85.216.196]) by alsa0.perex.cz (Postfix) with ESMTP id 3C2F3266C1E for ; Wed, 5 Apr 2017 21:44:59 +0200 (CEST) Received: by mail-qt0-f196.google.com with SMTP id x35so3004825qtc.1 for ; Wed, 05 Apr 2017 12:44:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=W+KA7COF5d95jGems5ylp/KJ9mdtGlx7Zf6mHlyyN/w=; b=AmJEIL8OVA/v1Z8wug496cxwMYk5iRJ2ObQinQcEsPVB1A7wXFlkJXr835Dz7idK8T GyK2Uj9caAFrcam5kUeRPOJibxs68ztXLE9MdhYSnUrjQEeu7NeR4tkQVN8CAzJbrAkz 4Zd7uIYwaMLMR7y0/C3HFxQ2Psz3kZuO1Jqile0ha6BpYJ8euDk/cMwXuO3RjFIBme2D 9nxbywLz1zwSF9F0yXTxKP+GDvsS5X2fZQ/+ibsjCVybYvv9DU4DiolW1ArwmqPvLEBC jkX6zt2LWCLVxK6Yf0shayh0FrMrwvYzi0GPEf97ntMVGdsbAd1hKcgUY0Szb/3wJpCx dw9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=W+KA7COF5d95jGems5ylp/KJ9mdtGlx7Zf6mHlyyN/w=; b=ZTaO+Jzdo/7jnB8jChJ5FbK39j7MGFwr6uNwm2GIe2i+G5R6Mr+NVKSJtzFcjCnVA2 oBPpBvhUaMY+EePGA4CiSKaa9FDZ7MaSIVtOMsD3KbHrku7mv5kG69/SkNfP7d62J1ui tpoX0/KwXt+9dER0V18fcaoRlttZTmweiJad82x0q4y6BqY6lns4md0xfDMDgJ72ry3p fcoIfUNFT3KCwurFkO0/d4U275PGa/36Kva+pU9OpTjAGzdzSzyj0X6DTYv5Ijcxnh4l fqh/sF/YQHZqCd+KQiQqWKtaZVmqqyUl4cvN4I8v6VKV15TcgluD+eZ3VVi2SjKQjJVa kEOg== X-Gm-Message-State: AFeK/H1uv4UlI+7vhg+M1xXiiVWJDB0W8O24UZxF5ntjAKuuBuIjEPZelMDRrNBs19IUeA== X-Received: by 10.200.3.38 with SMTP id q38mr29205519qtg.126.1491421498953; Wed, 05 Apr 2017 12:44:58 -0700 (PDT) Received: from localhost.localdomain ([189.61.213.245]) by smtp.gmail.com with ESMTPSA id k133sm7941591qke.25.2017.04.05.12.44.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Apr 2017 12:44:58 -0700 (PDT) From: Fabio Estevam To: broonie@kernel.org Date: Wed, 5 Apr 2017 16:44:06 -0300 Message-Id: <1491421446-13799-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491421446-13799-1-git-send-email-festevam@gmail.com> References: <1491421446-13799-1-git-send-email-festevam@gmail.com> Cc: nicoleotsuka@gmail.com, Fabio Estevam , alsa-devel@alsa-project.org, timur@tabi.org Subject: [alsa-devel] [PATCH v3 2/2] ASoC: fsl_ssi: Use the tolower() function X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam Code can be simplified by using the standard tolower() funtion. Signed-off-by: Fabio Estevam --- 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 #include #include +#include #include #include #include @@ -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,