From patchwork Thu Apr 30 08:22:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 192842 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1522EC83006 for ; Thu, 30 Apr 2020 08:25:14 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8D86620784 for ; Thu, 30 Apr 2020 08:25:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="qFdhTk84"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="YKkY+vnr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8D86620784 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E4BEE1689; Thu, 30 Apr 2020 10:24:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E4BEE1689 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1588235112; bh=Qhgi/O2t7nXOvs/vJBWw84dWIwgdVMXWLzFLsb3k2xI=; h=Date:In-Reply-To:References:Subject:From:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=qFdhTk84lML3+jJdOztUxu/c/RQ4/e8AeVDvSZskK2RgVm71xRxpT5ZAUmniltlr1 uEZTqjlBd2MmueIowXVJvVmqjtmBL/1vrfyIiEtyukYYLRlOpxnc6ppdrgJXjiqmtL cF+KmXKoYHh5+EL13OkmYKZSZfWkfINTUH9uaRJM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B6177F80271; Thu, 30 Apr 2020 10:22:50 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C81E1F8028C; Thu, 30 Apr 2020 10:22:49 +0200 (CEST) Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 75108F80266 for ; Thu, 30 Apr 2020 10:22:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 75108F80266 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="YKkY+vnr" Received: by mail-yb1-xb49.google.com with SMTP id g17so6900246ybk.4 for ; Thu, 30 Apr 2020 01:22:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=+QbyXCMWScEYIowgLIK0JS5woGAQrFK1EDiEHL1sfVo=; b=YKkY+vnrVL9zifogmdXZsTvj2bpRTN8p5ZwHlErBPit7rjaJM9RL9rrt5c8Uv2W5RZ nJsGPZDCuBy+6t9Vn8dXrzBP6re6oXEBD4aG84v768xtJrO5xaBKtipWCO0xKdhHgwJM 5R2luF5LBu5ilU6eJg/fKay+z9WU4uDkvivHhM5eCxgdYVSbGaa4lrrKQs4OcXn9AQxR WJisMFp4tErDjrXP2qyH4weY90G9NazBtoiVGrjpSbmFs4OXYlvW+B12GJGB21+r5VOw siwp0qNtws194KUcHnLFTgXONa4Y1+8SIT8a0JedKrG7CArolgmmVxNq0Q0dIAl2GuYF S98g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=+QbyXCMWScEYIowgLIK0JS5woGAQrFK1EDiEHL1sfVo=; b=Zwrg4VNlpZZA1aXElDCSQ5RFAahYvz8aZjf5VJtvF6j9uBpmYjaqZ1oqVW/iiph1ol Ry//Jl5j4vsBgTpOTH8r7b4VjosjdLyQeE3xzKPGPAT6HP6Hd0GP+398Cx5rrsXcBSs1 acPUntKDARV29D+hVyXGVij53Gz6sPKpelV4nNjAZ84bRMjgkVD1RJF8ilkGw8C48U0K qIgfDrhV80ekOgwqecdV6+Ea+Wit7lsb7faxWxoJlOB6EcL1hoFXLqt26p27jwQo0bt3 WBUe1/rFTOpGCTLSeT5xWqPyEEZ/TzGMFKFlkDfXOsVgJEaGz0e2Ejes7+bAAdz+yG3O z3tg== X-Gm-Message-State: AGi0PuYHi+DkRJ6qYHdue6yXLyc5UcMUDibjgrt5Fz/1xbx6MVIAr80x 0ZpOb/CQ08Lfe9hdTNgF5ky/FS3lJRPl X-Google-Smtp-Source: APiQypKkhnbTgkEYC+UYLolSafCNnS1VpVTxc5dEYk4OdTqs2mOC42YyORcQ7Y1wxXX/3szlPxHYQe5u6MaW X-Received: by 2002:a25:6404:: with SMTP id y4mr4039202ybb.374.1588234963414; Thu, 30 Apr 2020 01:22:43 -0700 (PDT) Date: Thu, 30 Apr 2020 16:22:26 +0800 In-Reply-To: <20200430082231.151127-1-tzungbi@google.com> Message-Id: <20200430082231.151127-2-tzungbi@google.com> Mime-Version: 1.0 References: <20200430082231.151127-1-tzungbi@google.com> X-Mailer: git-send-email 2.26.2.303.gf8c07b1a785-goog Subject: [PATCH 1/6] ASoC: rt5682: simplify assertions From: Tzung-Bi Shih To: broonie@kernel.org Cc: tzungbi@google.com, alsa-devel@alsa-project.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Simplifies assertions for errors. Signed-off-by: Tzung-Bi Shih --- sound/soc/codecs/rt5682.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c index d36f560ad7a8..e542aab46619 100644 --- a/sound/soc/codecs/rt5682.c +++ b/sound/soc/codecs/rt5682.c @@ -3462,7 +3462,7 @@ int rt5682_io_init(struct device *dev, struct sdw_slave *slave) ret = regmap_multi_reg_write(rt5682->regmap, patch_list, ARRAY_SIZE(patch_list)); - if (ret != 0) + if (ret) dev_warn(dev, "Failed to apply regmap patch: %d\n", ret); regmap_write(rt5682->regmap, RT5682_DEPOP_1, 0x0000); @@ -3536,8 +3536,7 @@ static int rt5682_i2c_probe(struct i2c_client *i2c, rt5682 = devm_kzalloc(&i2c->dev, sizeof(struct rt5682_priv), GFP_KERNEL); - - if (rt5682 == NULL) + if (!rt5682) return -ENOMEM; i2c_set_clientdata(i2c, rt5682); @@ -3562,14 +3561,14 @@ static int rt5682_i2c_probe(struct i2c_client *i2c, ret = devm_regulator_bulk_get(&i2c->dev, ARRAY_SIZE(rt5682->supplies), rt5682->supplies); - if (ret != 0) { + if (ret) { dev_err(&i2c->dev, "Failed to request supplies: %d\n", ret); return ret; } ret = regulator_bulk_enable(ARRAY_SIZE(rt5682->supplies), rt5682->supplies); - if (ret != 0) { + if (ret) { dev_err(&i2c->dev, "Failed to enable supplies: %d\n", ret); return ret; } @@ -3599,7 +3598,7 @@ static int rt5682_i2c_probe(struct i2c_client *i2c, ret = regmap_multi_reg_write(rt5682->regmap, patch_list, ARRAY_SIZE(patch_list)); - if (ret != 0) + if (ret) dev_warn(&i2c->dev, "Failed to apply regmap patch: %d\n", ret); regmap_write(rt5682->regmap, RT5682_DEPOP_1, 0x0000); From patchwork Thu Apr 30 08:22:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 192841 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6B4FC83009 for ; Thu, 30 Apr 2020 08:26:15 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 50F4D2073E for ; Thu, 30 Apr 2020 08:26:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="E7vfBZUr"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="uJ9oa9vq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 50F4D2073E Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A9976169E; Thu, 30 Apr 2020 10:25:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A9976169E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1588235173; bh=+/6KpuAI5OnaH1+1INwZBtm3jDTuiqntf9j7SGav3go=; h=Date:In-Reply-To:References:Subject:From:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=E7vfBZUroAfOu9Rir0h+C3JHEg0YD2KIIchdElJMl+H9OrB6GviVaKAnfwhMjlkTI zHaX5nAmSsJMsgwefRJjOB0pTr6Fj/s5tcpcdbTFHNe7lA5Yo/2oQrMNBaqCdW7PBZ GWLw3skZl8ld6bUsYhMDvN/Eh8avSwFMJnQYVnl8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 013D3F802A8; Thu, 30 Apr 2020 10:23:01 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0AC4CF802A0; Thu, 30 Apr 2020 10:22:57 +0200 (CEST) Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C8AF5F80299 for ; Thu, 30 Apr 2020 10:22:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C8AF5F80299 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="uJ9oa9vq" Received: by mail-yb1-xb4a.google.com with SMTP id i13so6783948ybl.13 for ; Thu, 30 Apr 2020 01:22:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=QAhamvk4O2Zfa+EjtB3QZix8CErM5lewhJjCrqGiG5U=; b=uJ9oa9vq1OeIFOfRXkMQzsWiPrjME2C//jSl5p+G95D9I3FqA+0s/BJRZPwQ8VyClm 9rvLixnHU3Ed+Iq3mvcFA9nB+n/rSm0LPNr4PQJw5UVXD0mGQDKXuthzBMQwgpnw5oHE 1cKVwYtZ/h1z9dZZ5HD3OQJPO8NRj9LH5Y4yodBCLuS0v1DYvZu6a9iQ0wLd8Vc2wJkA vjBmwppc8sTrIgi4S+Nu/zgRyNcy6jeTbiZIqo35eMUnTKmQYs2cxJr8mpKXQlOqHy+p X+ksrAG1Xh4ooNAwsbQHd2KkRvk+yynB6X16dnNriTNgt/3TFp9m61hGNSzHFjZwwdpE atFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=QAhamvk4O2Zfa+EjtB3QZix8CErM5lewhJjCrqGiG5U=; b=Ptv3LdO0vVI7C5Nhs7N08lepL46xSRsVxhWPOjhV//13FgrELcmLctU88NVjTZVPnf Qkted2xcAP07C7eAJ93xctfrgJ5IqVPrcAKZrONOHg2+gXyEgvNTJ4uzvG0bEpfEc6St MrrEVfT4AAXWIgakITXisnAoE4NmQedzkK5GH8Qk7y6Va6w0foqd6fLiEZ11Er54GdIN dNkGEhTdREhmZpj4bTcTZF43ycn2GJr7kXm7QpfkUzjj7akZIepZr73fTMDXUam9HrSi LTcbBQzrGnzN2ye0Xnj2i/+NdmyO8Qw31DyglbYW/mLYFKvjYh6xd4eYqKZ089rM0TnA fn7w== X-Gm-Message-State: AGi0PuacK6nbQ9eoysjcS9MjzQrmOXQX0tEcpjZGmjY9c6s2YeA6Ydrk /rPK3ggSnyMFbmPxfY4ioL4WvwtBeXo5 X-Google-Smtp-Source: APiQypIQo7EcrMYmhrDQCSdNkKaR4g+3RNIhpbhobADhH4JEuN8CHqCIhP3spY4twrMnzqP/VZnh+Q1G6o5B X-Received: by 2002:a25:ced3:: with SMTP id x202mr4048625ybe.164.1588234970687; Thu, 30 Apr 2020 01:22:50 -0700 (PDT) Date: Thu, 30 Apr 2020 16:22:28 +0800 In-Reply-To: <20200430082231.151127-1-tzungbi@google.com> Message-Id: <20200430082231.151127-4-tzungbi@google.com> Mime-Version: 1.0 References: <20200430082231.151127-1-tzungbi@google.com> X-Mailer: git-send-email 2.26.2.303.gf8c07b1a785-goog Subject: [PATCH 3/6] ASoC: rt5682: remove empty default case From: Tzung-Bi Shih To: broonie@kernel.org Cc: tzungbi@google.com, alsa-devel@alsa-project.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Removes empty default case. Also adds a missing break statement. Signed-off-by: Tzung-Bi Shih --- sound/soc/codecs/rt5682.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c index 7a38028f5e10..d38b2e8a7f43 100644 --- a/sound/soc/codecs/rt5682.c +++ b/sound/soc/codecs/rt5682.c @@ -950,6 +950,7 @@ static int rt5682_headset_detect(struct snd_soc_component *component, break; default: rt5682->jack_type = SND_JACK_HEADPHONE; + break; } } else { rt5682_enable_push_button_irq(component, false); @@ -1526,9 +1527,6 @@ static int rt5682_hp_event(struct snd_soc_dapm_widget *w, snd_soc_component_update_bits(component, RT5682_DAC_ADC_DIG_VOL1, 0x00c0, 0x0000); break; - - default: - return 0; } return 0; @@ -1550,9 +1548,6 @@ static int set_dmic_power(struct snd_soc_dapm_widget *w, /*Add delay to avoid pop noise*/ msleep(delay); break; - - default: - return 0; } return 0; @@ -1576,9 +1571,6 @@ static int rt5682_set_verf(struct snd_soc_dapm_widget *w, snd_soc_component_update_bits(component, RT5682_PWR_ANLG_1, RT5682_PWR_FV2, 0); break; - - default: - break; } break; @@ -1596,14 +1588,8 @@ static int rt5682_set_verf(struct snd_soc_dapm_widget *w, RT5682_PWR_ANLG_1, RT5682_PWR_FV2, RT5682_PWR_FV2); break; - - default: - break; } break; - - default: - return 0; } return 0; @@ -2483,8 +2469,7 @@ static int rt5682_set_bias_level(struct snd_soc_component *component, regmap_update_bits(rt5682->regmap, RT5682_PWR_ANLG_1, RT5682_PWR_BG, 0); break; - - default: + case SND_SOC_BIAS_ON: break; } From patchwork Thu Apr 30 08:22:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 192840 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 376C2C83001 for ; Thu, 30 Apr 2020 08:27:35 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B6BEC2073E for ; Thu, 30 Apr 2020 08:27:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="q/kAePVt"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="RUEbkkoJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B6BEC2073E Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 223CB168A; Thu, 30 Apr 2020 10:26:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 223CB168A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1588235253; bh=hQd95vleHDzw9hFvqAOtdCrLVQ3RCFYHWmtV+Xbf+cQ=; h=Date:In-Reply-To:References:Subject:From:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=q/kAePVtvBuhZhxPyKwkNV3M+2aLKZrIuYDFziriNSlCc2jwzb9ajU6/gu44ZefBo mGANcE7XeXNcCJ7p++N0c3GdjPXnoB71Bw5o8swM7aayDZMJsiJNLBakj28oMstqWj qVu7LvkFrsO9FVFh25EK21T9d2Jf5iMzplr37wKw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 61791F802D2; Thu, 30 Apr 2020 10:23:07 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7F6F4F802D2; Thu, 30 Apr 2020 10:23:04 +0200 (CEST) Received: from mail-qv1-xf4a.google.com (mail-qv1-xf4a.google.com [IPv6:2607:f8b0:4864:20::f4a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 422ADF802BD for ; Thu, 30 Apr 2020 10:23:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 422ADF802BD Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="RUEbkkoJ" Received: by mail-qv1-xf4a.google.com with SMTP id et5so5646007qvb.5 for ; Thu, 30 Apr 2020 01:22:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=rV3n/GzyDJJeYWEHRQOjMW82xxTBqbQrIp/TzZObPR4=; b=RUEbkkoJbg76NpQxWCQwI/0z0oa56+abUUXNTVQo9I7mXAWqBn1+jd5Y0kRrAKdkaL vVz66FTE//h31GBAcd0hzgvPOvvHHOgBEaDlVbD7MlyyUWKEBeVF4o5+ajFve2UtVb7D bcWHaGlEnwk3ihiqizbwU3QXqmGWcx5Zyr7Hs5M2LgrLKIvGWMWx064DT+P3R1/9zI63 nFShvJmwg+HnDZT7ujOWhojHGAdc6gZ33IHEbFm+pmC+qmvAuRys2D7L+3ZLLX3nE/BA AJZSatcz9KOY5OHNAzfXWwowU0wwUaZNL4h5tE1OvM5l7NFeozatXYPH2UQ92SIJkBzN d30Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=rV3n/GzyDJJeYWEHRQOjMW82xxTBqbQrIp/TzZObPR4=; b=IdHmqoqcPSFuv4SFdikjPnD3xn0svXoWk3spmqVcLJr2zhb25XwwZxvhOsCwRGkmwq 4B6UhritmkmZU8rdsc4Rln4YgYKPPQIgyd1fbcpSiGXZ+cCDjn2kdCVZcP2QSboFLAWI fNfrBh1dJpsMRSxOZ/IjPyVFNsg8/5oRzFxGNxrqDcStVIRd8t5uRJL8fn7NESgMqd8s 7/JhTtqlHwC2f4VL14XzkbAfKGOuUzor9k+nMCpJ9vnWEm2zJ8Cle2qaLoh53E+T84lF MjL0IXutBNrwiNTk2V1rrOGzJa95DN1p9vuPrYVTP/Ga+6Gdp0K9Yj8OM/ZqzavP+2aL nNIA== X-Gm-Message-State: AGi0PubzwT37Lcs4bbIfg/rXi+oTN0OzWr/d+yK4cAQSPwxValjkzNe7 xEEQwh0xZ295YoeJzHqdarbs4Hv5GjBD X-Google-Smtp-Source: APiQypIg/GHORj2Fr/8tMqMl7ByOwJjkMqLR9Ff4We6VzkkQtY8X+XOzkdEImxKYLSHrf66GnRMtMKy+mx2I X-Received: by 2002:a0c:8061:: with SMTP id 88mr1846383qva.212.1588234977983; Thu, 30 Apr 2020 01:22:57 -0700 (PDT) Date: Thu, 30 Apr 2020 16:22:30 +0800 In-Reply-To: <20200430082231.151127-1-tzungbi@google.com> Message-Id: <20200430082231.151127-6-tzungbi@google.com> Mime-Version: 1.0 References: <20200430082231.151127-1-tzungbi@google.com> X-Mailer: git-send-email 2.26.2.303.gf8c07b1a785-goog Subject: [PATCH 5/6] ASoC: rt5682: remove duplicate rt5682_reset() calls From: Tzung-Bi Shih To: broonie@kernel.org Cc: tzungbi@google.com, alsa-devel@alsa-project.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Removes duplicate rt5682_reset() calls. rt5682_calibrate() calls rt5682_reset() anyway. Signed-off-by: Tzung-Bi Shih --- sound/soc/codecs/rt5682.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c index bfe542dcc7ba..19fb9f1d8f49 100644 --- a/sound/soc/codecs/rt5682.c +++ b/sound/soc/codecs/rt5682.c @@ -3416,8 +3416,6 @@ int rt5682_io_init(struct device *dev, struct sdw_slave *slave) pm_runtime_get_noresume(&slave->dev); - rt5682_reset(rt5682); - if (rt5682->first_hw_init) { regcache_cache_only(rt5682->regmap, false); regcache_cache_bypass(rt5682->regmap, true); @@ -3569,8 +3567,6 @@ static int rt5682_i2c_probe(struct i2c_client *i2c, return -ENODEV; } - rt5682_reset(rt5682); - mutex_init(&rt5682->calibrate_mutex); rt5682_calibrate(rt5682);