From patchwork Wed Apr 5 19:02:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 9665467 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 D816E60364 for ; Wed, 5 Apr 2017 19:02:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C55992856A for ; Wed, 5 Apr 2017 19:02:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BA027285A5; Wed, 5 Apr 2017 19:02:51 +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 E187B2856A for ; Wed, 5 Apr 2017 19:02:50 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id F284F266C13; Wed, 5 Apr 2017 21:02:46 +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 B1EAB26716B; Wed, 5 Apr 2017 21:02:45 +0200 (CEST) Received: from mail-qk0-f193.google.com (mail-qk0-f193.google.com [209.85.220.193]) by alsa0.perex.cz (Postfix) with ESMTP id E403C266C13 for ; Wed, 5 Apr 2017 21:02:42 +0200 (CEST) Received: by mail-qk0-f193.google.com with SMTP id p22so2938634qka.0 for ; Wed, 05 Apr 2017 12:02:42 -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=E956f+8Sobl/ThPhBwsT/3ensCr73WDg3Iw97QiLgFA=; b=oAy//1ISAU3ntF5b/kxhzbCVbo0zJ7PwQlvxu0jNa6eBdepyBM78eEDhY26MQiiTEZ IOpog63c9vuCqM9NpfLBfaAj7QqV1UwE0HmDM3Mp/Bk67qboDGa/XJrN9OToXvbi4Kyn zsCl2/4daXJKP2TUBwT7U+/hOhx4U5Hmh5MOkj21ClvHnx93U/hr26pctoKzztekIPAg LZZLKshUfxPZ2bu4RFInGgIDBzXXm16RWGQ/VQoOIAj1FiXjRI9ZVke6+lGq1ha30h8T vrytYVTTOW+3AWAHZSmRzYjHlP7vWF/hhbI7q8NyWpYudkYBxIaxWLdPegQGSCJCoH7b 44eQ== 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=E956f+8Sobl/ThPhBwsT/3ensCr73WDg3Iw97QiLgFA=; b=U3eGGwSe1/V8rbN/WEgXRhNOrPGEzRJclc0qw2LcsVR/iLLkWZN3MoEWnIeSW7WHVN be2PTwXIyf34va1YRCzrYjBbcxFclF4llnqHOxh55L6bzLcPAGWiWb310TPpQb9s2MgY mMZUmex+SOPxc8SUUlHzm/vpFhGRV5nafVpBzNoJFPvJsW7OeF0mjK1I3B6Yv4v0y+Vf 56botbUlcnVBadp2GFLBTXWcqh3FDK7GaUCVjNPI5uGeW5d65lzmEvjB5KzJ2JoRLMTL mVAwsMWP1BaNq5AGzOVOHmlQpjEvCHiXBgJanCr0yryjd1D/IqhysXMv0EtaDAadT2xt P8xg== X-Gm-Message-State: AFeK/H05t8bRUF5xst9aHxLPRA/UyvDYnZXHk3tDQnkONzHPZdnWLKeaBI+I5xIMSGEZHw== X-Received: by 10.233.221.196 with SMTP id r187mr28814687qkf.56.1491418961695; Wed, 05 Apr 2017 12:02:41 -0700 (PDT) Received: from localhost.localdomain ([189.61.213.245]) by smtp.gmail.com with ESMTPSA id f28sm14581068qtf.44.2017.04.05.12.02.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Apr 2017 12:02:41 -0700 (PDT) From: Fabio Estevam To: broonie@kernel.org Date: Wed, 5 Apr 2017 16:02:26 -0300 Message-Id: <1491418946-10585-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491418946-10585-1-git-send-email-festevam@gmail.com> References: <1491418946-10585-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 v2 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 v1: - 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 e0639e17..baf26fc 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 @@ -1323,14 +1324,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,