From patchwork Mon Oct 7 17:11:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 175395 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp4557394ill; Mon, 7 Oct 2019 10:09:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxOnJat0F6Bl2TokYjn/DWdCkUMIm846qK0xRr1ESUiMds3dA5CO4QMk2TCs6V2BipOaZXd X-Received: by 2002:a50:8d5e:: with SMTP id t30mr30180564edt.112.1570468187217; Mon, 07 Oct 2019 10:09:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570468187; cv=none; d=google.com; s=arc-20160816; b=XTcb3Bp3/70TMJZCsgoyHlJb5c0qLF76HG510PwZaaQ/vmTC5A4uZRh+8xNNxF2/tq 1UmuPQj/X68OVEhA0FK3WDsm5oZ6IHYjcFYTjONWa7H8FgnM+pvXCKi46Dmvuhia/CPL qjtzaTWvo3rk5SR4qHUg8rxKLyF+aR2r1ielmm9PkWcxnLA0lUZAuIUAkxtLjRZTndsN KU1nFJSytiEKFKtmwMOcDsZx8bJky9wEV+KZzeIWX7c9wn2WMY0czkdZ83zIcSyBoNnC CnnWIWfx4Eg6ytDKnREJW6nrz8xXJ7mOYhScOSNUzBEGt8mT/KvMPw4KJSDtfgk6oNaZ sjdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Uj2L0n4bSMjAeSXo6uEKjVpSlKE2402ydacUosjJgTo=; b=kduxLHutiVOfVZFuLG5QvSH3Gv07SSp0aQH70tI5DLWCQOF+OYA4Qs15yyVbziMKqz B8oTkXfe6Sot9rSiey5gTHpmWxBKhJ7qhfG81j3IMjKN55wnd5Lms7aT85me+o4idLYr 1hrwdLQ7TrfBdjg9/HwSYYtxn4lY/OxlUl/rBxj6Bctn0NSZZvpvWsg9UTZ77JtxQOza uOl/ER0MHSFG4eVBCrOu/ddphI6ycjsV29MLpd+8WQvE79Nl21fBiLPq1ngPx72/T6kX jqM8IVozoHtVPtJSs9usZErvfXd9MmIapwWmGP7AfVdYy02Q/CGCr2Ds/C+nfySG4IT3 M6nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ZzpVKSJO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i5si9458290edj.107.2019.10.07.10.09.46; Mon, 07 Oct 2019 10:09:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ZzpVKSJO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729070AbfJGRJn (ORCPT + 26 others); Mon, 7 Oct 2019 13:09:43 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:54528 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728130AbfJGRJm (ORCPT ); Mon, 7 Oct 2019 13:09:42 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x97H9HQP034661; Mon, 7 Oct 2019 12:09:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570468157; bh=Uj2L0n4bSMjAeSXo6uEKjVpSlKE2402ydacUosjJgTo=; h=From:To:CC:Subject:Date; b=ZzpVKSJOY1F/PRsf5iTKydJBrQS0AFU3f5fHYCkl+/vIYGcJy5XnpSVqQ1H69+IMO i1Bd8faoTrZBaZ3xN6tL/KpYiv6Gg17MoWNVS3Z+mSxQMuZEZMdg7C846Mvisx0+WD MPMdjhHXthbJaiyx/6YywOUxbVbhNd+VM3EXBxUs= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x97H9GOC067748 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 7 Oct 2019 12:09:17 -0500 Received: from DLEE104.ent.ti.com (157.170.170.34) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 7 Oct 2019 12:09:14 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Mon, 7 Oct 2019 12:09:14 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x97H9GFE005648; Mon, 7 Oct 2019 12:09:16 -0500 From: Dan Murphy To: , CC: , , , , , , Dan Murphy Subject: [PATCH v2 1/3] ASoC: tas2770: Fix snd_soc_update_bits error handling Date: Mon, 7 Oct 2019 12:11:55 -0500 Message-ID: <20191007171157.17813-1-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org According the documentation for snd_soc_update_bits the API will return a 1 if the update was successful with a value change, a 0 if the update was successful with no value change or a negative if the command just failed. So the value of return in the driver needs to be checked for being less then 0 or the caller may indicate failure when the value actually changed. Signed-off-by: Dan Murphy --- v2 - Missed one update_bit return issue. sound/soc/codecs/tas2770.c | 46 +++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 16 deletions(-) -- 2.22.0.214.g8dca754b1e diff --git a/sound/soc/codecs/tas2770.c b/sound/soc/codecs/tas2770.c index dbbb21fe0548..361d0bba72b3 100644 --- a/sound/soc/codecs/tas2770.c +++ b/sound/soc/codecs/tas2770.c @@ -82,7 +82,8 @@ static int tas2770_codec_suspend(struct snd_soc_component *component) TAS2770_PWR_CTRL, TAS2770_PWR_CTRL_MASK, TAS2770_PWR_CTRL_SHUTDOWN); - if (ret) + + if (ret < 0) return ret; return 0; @@ -96,8 +97,9 @@ static int tas2770_codec_resume(struct snd_soc_component *component) TAS2770_PWR_CTRL, TAS2770_PWR_CTRL_MASK, TAS2770_PWR_CTRL_ACTIVE); - if (ret) - return -EINVAL; + + if (ret < 0) + return ret; return 0; } @@ -149,7 +151,10 @@ static int tas2770_dac_event(struct snd_soc_dapm_widget *w, } end: - return ret; + if (ret < 0) + return ret; + + return 0; } static const struct snd_kcontrol_new isense_switch = @@ -199,7 +204,10 @@ static int tas2770_mute(struct snd_soc_dai *dai, int mute) TAS2770_PWR_CTRL_MASK, TAS2770_PWR_CTRL_ACTIVE); - return ret; + if (ret < 0) + return ret; + + return 0; } static int tas2770_set_bitwidth(struct tas2770_priv *tas2770, int bitwidth) @@ -252,7 +260,10 @@ static int tas2770_set_bitwidth(struct tas2770_priv *tas2770, int bitwidth) tas2770->i_sense_slot); end: - return ret; + if (ret < 0) + return ret; + + return 0; } static int tas2770_set_samplerate(struct tas2770_priv *tas2770, int samplerate) @@ -344,9 +355,11 @@ static int tas2770_set_samplerate(struct tas2770_priv *tas2770, int samplerate) } end: - if (!ret) - tas2770->sampling_rate = samplerate; - return ret; + if (ret < 0) + return ret; + + tas2770->sampling_rate = samplerate; + return 0; } static int tas2770_hw_params(struct snd_pcm_substream *substream, @@ -401,7 +414,7 @@ static int tas2770_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) ret = snd_soc_component_update_bits(component, TAS2770_TDM_CFG_REG1, TAS2770_TDM_CFG_REG1_RX_MASK, asi_cfg_1); - if (ret) + if (ret < 0) return ret; switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { @@ -426,7 +439,7 @@ static int tas2770_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) ret = snd_soc_component_update_bits(component, TAS2770_TDM_CFG_REG1, TAS2770_TDM_CFG_REG1_MASK, (tdm_rx_start_slot << TAS2770_TDM_CFG_REG1_51_SHIFT)); - if (ret) + if (ret < 0) return ret; value = snd_soc_component_read32(component, TAS2770_TDM_CFG_REG3); @@ -472,12 +485,12 @@ static int tas2770_set_dai_tdm_slot(struct snd_soc_dai *dai, ret = snd_soc_component_update_bits(component, TAS2770_TDM_CFG_REG3, TAS2770_TDM_CFG_REG3_30_MASK, (left_slot << TAS2770_TDM_CFG_REG3_30_SHIFT)); - if (ret) + if (ret < 0) return ret; ret = snd_soc_component_update_bits(component, TAS2770_TDM_CFG_REG3, TAS2770_TDM_CFG_REG3_RXS_MASK, (right_slot << TAS2770_TDM_CFG_REG3_RXS_SHIFT)); - if (ret) + if (ret < 0) return ret; switch (slot_width) { @@ -511,10 +524,11 @@ static int tas2770_set_dai_tdm_slot(struct snd_soc_dai *dai, ret = -EINVAL; } - if (!ret) - tas2770->slot_width = slot_width; + if (ret < 0) + return ret; - return ret; + tas2770->slot_width = slot_width; + return 0; } static struct snd_soc_dai_ops tas2770_dai_ops = { From patchwork Mon Oct 7 17:11:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 175394 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp4557316ill; Mon, 7 Oct 2019 10:09:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqxH92VqUVIIzQGk5LOqtnBjDK8Lnj9cblzqW9VhgWvRhmfK4JvtDJOrTruRiZBuuDk39y/G X-Received: by 2002:a17:906:6d1:: with SMTP id v17mr24786546ejb.74.1570468183265; Mon, 07 Oct 2019 10:09:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570468183; cv=none; d=google.com; s=arc-20160816; b=pHBDTftD9pCm2Ve2Gmvd44uhGDIN48fK/YnTTXQNZesn6g7CjHAS+nD/PQMJf2HEe0 R+o+AzYEpC4m3wtxwZXCNYAbZ7HCODLnkPnpFWlrgVtqCzTif+Rj+sR3MYVG+VpylQeY c7xbrYp1/rzDeLsaAJFTBEMspP4qITCX/LA1Qzop7odG4dBnXVsAjFWsAvxv/OZdZAzU nwXZmBVZ4HvlfO8QzEjtF9+ykeN6DcD7zIjO2n2aQ1ko7DJSPhMTwIdThuFPh2gNHYe0 RidvFVcPj4Y+LqwPdQ3OYlYbokwwKufqEOhJ1pAnNN513+xfqdCw2VIOIbBoKMUF7grU BGrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oVMcBS9B51Vlj09LuDSqLmxgOK3U5xBBbOwYpJ+/9WQ=; b=wrqdxgTMK6g9ieMQPc8DaDp09SK1Ab6VRwDiXyF768MvBLpwkBMJ2dfkkn8IKb7Ry2 0c4goAwok8if3K3mng6lwjEE5GfdKnuhGVI437YBHrWqtdGUpLRxs0ZhnyEMJqE9nM90 1WM27He+X6qv4M+OrAIrKBB01f0hREHDSe1KDSX71eubnMieJh3NfO5mILfYF2u1DPhF XYh4VI2W+oDzfidRQAv60jO6Jq281qT5HeqK71nRj81OcGI2kJMjpZiHIEKi6+wSNXVg ilvk5i0YGj3hA7J5fU9y7VWgNGbbKZDniQQZuw4DdW2vQgxEK9V7kzuya74hxSG8JFl5 aA1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="TtaIHK/S"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d35si8591841ede.440.2019.10.07.10.09.42; Mon, 07 Oct 2019 10:09:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="TtaIHK/S"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728767AbfJGRJm (ORCPT + 26 others); Mon, 7 Oct 2019 13:09:42 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:49730 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728028AbfJGRJl (ORCPT ); Mon, 7 Oct 2019 13:09:41 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x97H9HFp077194; Mon, 7 Oct 2019 12:09:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570468157; bh=oVMcBS9B51Vlj09LuDSqLmxgOK3U5xBBbOwYpJ+/9WQ=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=TtaIHK/S8FEUT4UAj+g5dz/o5t5xQhmZEwiYlCHINILdBtQ2yg1T7WyjgwHQv8vXE CRmWx+br6Kwxh3hAK/50nN29sE2hajNdaK4If9DRwBxWgAGRQs0tFemFUdv/kcj6BJ kgyewPBVsncxsJXjAqhmWRu6IbUcQaXBf8Fo7TrU= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x97H9HNg055073 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 7 Oct 2019 12:09:17 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 7 Oct 2019 12:09:14 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Mon, 7 Oct 2019 12:09:14 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x97H9GEF026321; Mon, 7 Oct 2019 12:09:16 -0500 From: Dan Murphy To: , CC: , , , , , , Dan Murphy Subject: [PATCH v2 2/3] ASoC: tas2770: Remove unneeded read of the TDM_CFG3 register Date: Mon, 7 Oct 2019 12:11:56 -0500 Message-ID: <20191007171157.17813-2-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191007171157.17813-1-dmurphy@ti.com> References: <20191007171157.17813-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove the unneeded and incorrect read of the TDM_CFG3 register. The read is done but the value is never used. Signed-off-by: Dan Murphy --- v2 - New patch no v1 sound/soc/codecs/tas2770.c | 3 --- 1 file changed, 3 deletions(-) -- 2.22.0.214.g8dca754b1e diff --git a/sound/soc/codecs/tas2770.c b/sound/soc/codecs/tas2770.c index 361d0bba72b3..c1e28dd0b73e 100644 --- a/sound/soc/codecs/tas2770.c +++ b/sound/soc/codecs/tas2770.c @@ -386,7 +386,6 @@ static int tas2770_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) { u8 tdm_rx_start_slot = 0, asi_cfg_1 = 0; int ret; - int value = 0; struct snd_soc_component *component = dai->component; struct tas2770_priv *tas2770 = snd_soc_component_get_drvdata(component); @@ -442,8 +441,6 @@ static int tas2770_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) if (ret < 0) return ret; - value = snd_soc_component_read32(component, TAS2770_TDM_CFG_REG3); - tas2770->asi_format = fmt; return 0; From patchwork Mon Oct 7 17:11:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 175396 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp4557582ill; Mon, 7 Oct 2019 10:09:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqyC0cABvAbD9mxn/K5c2dcIxuOB9J0d/Oy1G0Gbw6Q8ht3zAW1pxQBnETuydqsclKwILWfa X-Received: by 2002:a17:906:bcd6:: with SMTP id lw22mr25395111ejb.270.1570468195279; Mon, 07 Oct 2019 10:09:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570468195; cv=none; d=google.com; s=arc-20160816; b=0EnJA8dJZJ1WG29u0CzZ6yYwNEp//n32CDopSECndRUL6t9EPg3rwtjcGW7kvQ0KsG wuCgAjJkrT2hGetujBCOJrY9lT/w/5I0iN7qDdPw0ISodmKKWQVFkGgq75Hn2QuqaxbR Mcb+ReBeDNpiNxrAijQLlrYlvK0V+CmAqOShf/oA1hEW/eDduBttP/RoFPywSKjZEN0G /fZus++QpBP4WvvXsvbm7YcBY6RiaKVBYEo9wS7/kuLC3g8+pEUrr/fCfEJU04X1RcA/ SXeZUhtHwDMH9EXPiOBY9805Jl/mdab2Gu4Tzzk73w0r007UFi80tiF4RXHpGjnaGPRv pAHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qqvkpyb/zkfTPkxgRMnn6l/UTJ4GrNMbr9o3D9e32hE=; b=gBvi9r1HQ5Qmyr+tPE6APsYW+y3w+D7J0b3TsyO5Gpn6zp0HsnJLmSmn/+4hlMymys lICogUYaXLA2+8UYeHQgSsMpzYEYIrBHuHSgDBVBL8hGk9Tjz5T8mJzo/FtWWsiAyavC SIm0DZ55F/J6i+wnPMNAnbvp8swpP4XMkj1SHe91LkT5GD1hLx3jXhZCSgMJO/hXybul +mDmaD7QSKeGpmLbZ29kt9OQPety4ITYdDnUBBWPc22uX1A0mMpYze2AqcavRovPLbv0 YNOa1tMehtjHB0YywpGbqpjClP1pwYPfeeHTTn8Z0wXsgRT9eaOugy97tz5xd3oVvWDl wATA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ss1qvHOt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i5si9458290edj.107.2019.10.07.10.09.54; Mon, 07 Oct 2019 10:09:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ss1qvHOt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729178AbfJGRJy (ORCPT + 26 others); Mon, 7 Oct 2019 13:09:54 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:54526 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728079AbfJGRJm (ORCPT ); Mon, 7 Oct 2019 13:09:42 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x97H9HDV034666; Mon, 7 Oct 2019 12:09:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570468157; bh=qqvkpyb/zkfTPkxgRMnn6l/UTJ4GrNMbr9o3D9e32hE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ss1qvHOtn/k3L5BBiwEn+HG2R0xjf3yJP3LNZiNpgbp7011gHXPKoYeQpIEPEt/6I 7Nz2VGN3FXe8mKAfXJQKpLZWH2wey5puHCybYHtBKCoyhvabHURK3STkStGToinHlJ xdUnMlu+cIMwK7kFYBGG/8dfH5odZRTISmh3VeSA= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id x97H9Hww083178; Mon, 7 Oct 2019 12:09:17 -0500 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 7 Oct 2019 12:09:17 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Mon, 7 Oct 2019 12:09:14 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x97H9G9s118747; Mon, 7 Oct 2019 12:09:16 -0500 From: Dan Murphy To: , CC: , , , , , , Dan Murphy Subject: [PATCH v2 3/3] ASoc: tas2770: Remove unused defines and variables Date: Mon, 7 Oct 2019 12:11:57 -0500 Message-ID: <20191007171157.17813-3-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191007171157.17813-1-dmurphy@ti.com> References: <20191007171157.17813-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove unused defines and structure variables that are not referenced by the code. If these are needed for future enhancements then they should be added at that time. Signed-off-by: Dan Murphy --- v2 - New patch no v1 sound/soc/codecs/tas2770.h | 21 --------------------- 1 file changed, 21 deletions(-) -- 2.22.0.214.g8dca754b1e diff --git a/sound/soc/codecs/tas2770.h b/sound/soc/codecs/tas2770.h index d597a8280707..cbb858369fe6 100644 --- a/sound/soc/codecs/tas2770.h +++ b/sound/soc/codecs/tas2770.h @@ -125,40 +125,19 @@ #define ERROR_UNDER_VOLTAGE 0x0000008 #define ERROR_BROWNOUT 0x0000010 #define ERROR_CLASSD_PWR 0x0000020 -#define TAS2770_SLOT_16BIT 16 -#define TAS2770_SLOT_32BIT 32 -#define TAS2770_I2C_RETRY_COUNT 3 - -struct tas2770_register { - int book; - int page; - int reg; -}; - -struct tas2770_dai_cfg { - unsigned int dai_fmt; - unsigned int tdm_delay; -}; struct tas2770_priv { struct device *dev; struct regmap *regmap; - struct snd_soc_codec *codec; struct snd_soc_component *component; - struct mutex dev_lock; - struct hrtimer mtimer; int power_state; int asi_format; struct gpio_desc *reset_gpio; int sampling_rate; - int frame_size; int channel_size; int slot_width; int v_sense_slot; int i_sense_slot; - bool runtime_suspend; - unsigned int err_code; - struct mutex codec_lock; }; #endif /* __TAS2770__ */