From patchwork Mon Jul 25 10:11:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12927947 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 9FF04C433EF for ; Mon, 25 Jul 2022 10:11:00 +0000 (UTC) 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 A856E84C; Mon, 25 Jul 2022 12:10:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A856E84C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1658743858; bh=pfFlYQJ46XkjUNiMAdcxTdm9mH/GEjmoBFYjs3nO3f0=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=DRoCc3Hr9hgZOue8b46xWqNVpPZxavkZsBY03mnEMhD5xXlPv8Sq5EWhleBOMImsw oAC2D7E4xEU0Fkpo+IpLe9WEoMmdugFI/U2oN694bkiT+qgY5heNuES2J6Ubjz3D/V fdIOM5My+a3mT2Okk0X04hlb714IRuYXbQfsf/DA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 67D4BF80543; Mon, 25 Jul 2022 12:09:24 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 01E11F80128; Mon, 25 Jul 2022 12:09:21 +0200 (CEST) Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E9866F80115 for ; Mon, 25 Jul 2022 12:09:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E9866F80115 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="Pa2UeQ6F" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1658743755; x=1690279755; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pfFlYQJ46XkjUNiMAdcxTdm9mH/GEjmoBFYjs3nO3f0=; b=Pa2UeQ6FmqtkIOI6pgP2ouG9J2jQdppoCNESs4zmgEaIpQURJQlYp5e7 PJ30wqqphRpmw6MPDIwJsb2rOwn7D1pYNgqQB77A/SXUjOpvcvgkjLtA6 EKJkbnywdJGAmhYsiCPHVjUJVsU1RMiixadtTpOm7auHy8kxmv++0+b9v nYVPDqmccGSRo9de4/1gU1LgVPA0T36mu49Z0SZcsapaS88pRtK1Yvw9v +AJfycDI5//l4jWMaFR7bKpnLuZPdH6kckqZzsluQaTAWlCfV9RJ/Mq0l 0NCuKujj65WtdOtzXyTxXMR+zIIq0c+mGi3bQ+wMmAoYH4gSJG6KCusiP g==; X-IronPort-AV: E=Sophos;i="5.93,192,1654585200"; d="scan'208";a="173666576" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Jul 2022 03:09:09 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Mon, 25 Jul 2022 03:09:09 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Mon, 25 Jul 2022 03:09:06 -0700 From: Claudiu Beznea To: , , , , , Subject: [PATCH 1/5] ASoC: mchp-spdifrx: disable end of block interrupt on failures Date: Mon, 25 Jul 2022 13:11:26 +0300 Message-ID: <20220725101130.1780393-2-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220725101130.1780393-1-claudiu.beznea@microchip.com> References: <20220725101130.1780393-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea 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" Disable end of block interrupt in case of wait for completion timeout or errors to undo previously enable operation (done in mchp_spdifrx_isr_blockend_en()). Otherwise we can end up with an unbalanced reference counter for this interrupt. Fixes: ef265c55c1ac ("ASoC: mchp-spdifrx: add driver for SPDIF RX") Signed-off-by: Claudiu Beznea --- sound/soc/atmel/mchp-spdifrx.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sound/soc/atmel/mchp-spdifrx.c b/sound/soc/atmel/mchp-spdifrx.c index 0d37b78b94a0..b6a753893d90 100644 --- a/sound/soc/atmel/mchp-spdifrx.c +++ b/sound/soc/atmel/mchp-spdifrx.c @@ -288,15 +288,17 @@ static void mchp_spdifrx_isr_blockend_en(struct mchp_spdifrx_dev *dev) spin_unlock_irqrestore(&dev->blockend_lock, flags); } -/* called from atomic context only */ +/* called from atomic/non-atomic context */ static void mchp_spdifrx_isr_blockend_dis(struct mchp_spdifrx_dev *dev) { - spin_lock(&dev->blockend_lock); + unsigned int flags; + + spin_lock_irqsave(&dev->blockend_lock); dev->blockend_refcount--; /* don't enable BLOCKEND interrupt if it's already enabled */ if (dev->blockend_refcount == 0) regmap_write(dev->regmap, SPDIFRX_IDR, SPDIFRX_IR_BLOCKEND); - spin_unlock(&dev->blockend_lock); + spin_unlock_irqrestore(&dev->blockend_lock); } static irqreturn_t mchp_spdif_interrupt(int irq, void *dev_id) @@ -575,6 +577,7 @@ static int mchp_spdifrx_subcode_ch_get(struct mchp_spdifrx_dev *dev, if (ret <= 0) { dev_dbg(dev->dev, "user data for channel %d timeout\n", channel); + mchp_spdifrx_isr_blockend_dis(dev); return ret; } From patchwork Mon Jul 25 10:11:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12927946 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 7689DC43334 for ; Mon, 25 Jul 2022 10:10:38 +0000 (UTC) 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 77BFA843; Mon, 25 Jul 2022 12:09:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 77BFA843 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1658743836; bh=7eNUHi9m1jTYNb6cRhRIgN0JdTON6pZLix7RTM4B5OU=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=en+0wd/RYnAro6Kd8hgNHBfXxXotRrQ2JjSw3o5H6dZ5hTII7NuKCSmqnLbtNP+Wp i+5KAmaBI9HSz7mQf5sAws3qOq/JrfgwsrH9lXWbN8lWY70znwe5ouEn85hNErBEir oAH0wRMgk9L2vUF0mcTRqTrNAkehVdDqgENJBJ+Q= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4C4CFF80128; Mon, 25 Jul 2022 12:09:23 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E9965F8053C; Mon, 25 Jul 2022 12:09:21 +0200 (CEST) Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7A650F80128 for ; Mon, 25 Jul 2022 12:09:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7A650F80128 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="eCCGVbl1" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1658743755; x=1690279755; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7eNUHi9m1jTYNb6cRhRIgN0JdTON6pZLix7RTM4B5OU=; b=eCCGVbl1IJTZcj64IN9Kz5/H/ZSrnxIEUxfmN1ONiLJDUjEz2Sqw2m7Z /5snwc5MzaB7f6/o68v5faSWRdo6baFm9V1v1Vsh1o4y35/dTBGhCnqEp Ro2cTKCIul1f/YPBcjKprQhrwuG/qpG7hx9HMi2YG/E/pCdvQ9qST3owd gige9ECr3rSU0ywfuIOiuYb0u1LEXhg0LMPXvA/YCFd590jatUnwg1Kc4 mlzdmB6cljl/hAsXBZIqkuj9Wz3N/hi8S+3K3qeIy0LjARfA5X2pvwdfF hW5PTinfF2W4f7LV8km5TgX8PrY5OhQUD43mEm0o/9gqu7+QF74PGyrZ4 g==; X-IronPort-AV: E=Sophos;i="5.93,192,1654585200"; d="scan'208";a="173496314" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Jul 2022 03:09:12 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Mon, 25 Jul 2022 03:09:11 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Mon, 25 Jul 2022 03:09:09 -0700 From: Claudiu Beznea To: , , , , , Subject: [PATCH 2/5] ASoC: mchp-spdifrx: use single tag indent for structure Date: Mon, 25 Jul 2022 13:11:27 +0300 Message-ID: <20220725101130.1780393-3-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220725101130.1780393-1-claudiu.beznea@microchip.com> References: <20220725101130.1780393-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea 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" Use single tab indentation for mchp_spdifrx_mixer_control structure. Signed-off-by: Claudiu Beznea --- sound/soc/atmel/mchp-spdifrx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/atmel/mchp-spdifrx.c b/sound/soc/atmel/mchp-spdifrx.c index b6a753893d90..fcc5ca865d81 100644 --- a/sound/soc/atmel/mchp-spdifrx.c +++ b/sound/soc/atmel/mchp-spdifrx.c @@ -221,11 +221,11 @@ struct mchp_spdifrx_user_data { }; struct mchp_spdifrx_mixer_control { - struct mchp_spdifrx_ch_stat ch_stat[SPDIFRX_CHANNELS]; - struct mchp_spdifrx_user_data user_data[SPDIFRX_CHANNELS]; - bool ulock; - bool badf; - bool signal; + struct mchp_spdifrx_ch_stat ch_stat[SPDIFRX_CHANNELS]; + struct mchp_spdifrx_user_data user_data[SPDIFRX_CHANNELS]; + bool ulock; + bool badf; + bool signal; }; struct mchp_spdifrx_dev { From patchwork Mon Jul 25 10:11:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12927948 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A52C2C43334 for ; Mon, 25 Jul 2022 10:11:10 +0000 (UTC) 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 D8C6286F; Mon, 25 Jul 2022 12:10:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D8C6286F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1658743868; bh=YaWb7yZxkGG+zBnJL2IFm2f4uUx2GkI4cjt6VNqnQM4=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=EL2jaBEA/6Q/FqxoERc2htpM7y8A7cyHnpNwJUxDccKG7hivmQocx/mge10vqwmK/ D1wzknslPvKKeK8AI8UaXEjJzDg7pANWyFqB3Ur4ExPo+nlFoscpUF+dub+abvLvUw ln5YLghE/aVxivUZROuqQJWk7xF3m5+/dr7vN0+A= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 27E8BF80544; Mon, 25 Jul 2022 12:09:29 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 762ECF80552; Mon, 25 Jul 2022 12:09:27 +0200 (CEST) Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 65D47F804FC for ; Mon, 25 Jul 2022 12:09:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 65D47F804FC Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="DytO7a9L" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1658743760; x=1690279760; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YaWb7yZxkGG+zBnJL2IFm2f4uUx2GkI4cjt6VNqnQM4=; b=DytO7a9LYduqlzliP2lHjkYzGicV2U1MCrljJU78ynpO0q7mocveeUIA OCkfHih8rEHl2lTXf6W6nt8lH+PEmSkUISpQ00sSMUdlj07+Key8KoX2I ea1YGbxtR9C6Yhzsp4/LgktDk7Au+iHXVbNEamtepC551bUEnAY5m+xtw zzKal/Og5RJu/QaajVkrrzPo0aOxr1xtyfuO/tHhNGBpFjuX41p70dGlI MFof08asllxRL0xrLcjg1dMT4nHf8vAQYqNlAW8L2FhSYBTlUdK0v5n7o XG3axXc2Y2I8zdEKqSN0LKBWTUT2qOr/b/H9EIn4OCW6YWfNqOQov5mlJ A==; X-IronPort-AV: E=Sophos;i="5.93,192,1654585200"; d="scan'208";a="183602498" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Jul 2022 03:09:14 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Mon, 25 Jul 2022 03:09:14 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Mon, 25 Jul 2022 03:09:12 -0700 From: Claudiu Beznea To: , , , , , Subject: [PATCH 3/5] ASoC: mchp-spdiftx: remove references to mchp_i2s_caps Date: Mon, 25 Jul 2022 13:11:28 +0300 Message-ID: <20220725101130.1780393-4-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220725101130.1780393-1-claudiu.beznea@microchip.com> References: <20220725101130.1780393-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea 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" Remove references to struct mchp_i2s_caps as they are not used. Signed-off-by: Claudiu Beznea --- sound/soc/atmel/mchp-spdiftx.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sound/soc/atmel/mchp-spdiftx.c b/sound/soc/atmel/mchp-spdiftx.c index 78d5bcf0819a..20e77b374f7e 100644 --- a/sound/soc/atmel/mchp-spdiftx.c +++ b/sound/soc/atmel/mchp-spdiftx.c @@ -196,7 +196,6 @@ struct mchp_spdiftx_dev { struct clk *pclk; struct clk *gclk; unsigned int fmt; - const struct mchp_i2s_caps *caps; int gclk_enabled:1; }; @@ -768,7 +767,6 @@ MODULE_DEVICE_TABLE(of, mchp_spdiftx_dt_ids); static int mchp_spdiftx_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; - const struct of_device_id *match; struct mchp_spdiftx_dev *dev; struct resource *mem; struct regmap *regmap; @@ -782,11 +780,6 @@ static int mchp_spdiftx_probe(struct platform_device *pdev) if (!dev) return -ENOMEM; - /* Get hardware capabilities. */ - match = of_match_node(mchp_spdiftx_dt_ids, np); - if (match) - dev->caps = match->data; - /* Map I/O registers. */ base = devm_platform_get_and_ioremap_resource(pdev, 0, &mem); if (IS_ERR(base)) From patchwork Mon Jul 25 10:11:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12927949 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id E5009C43334 for ; Mon, 25 Jul 2022 10:11:24 +0000 (UTC) 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 28486E0F; Mon, 25 Jul 2022 12:10:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 28486E0F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1658743883; bh=WwU9nxdctQsI4jH9K6IXqln2aORb9QSIuV6qe2LWzS8=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=VnDJFLUDAhy3MfsS4AojM8uAkMQzrhNlkvKYEq51RTvu4P8SeW9//W78AeCICVDrb h9ys8RcNdKOQkefsLCnaG7sbuh3xCJl9hvbMZ2ERziAas+gy4MistTrhqOkqBaDq80 ovO8iPsQ66ppcLIYx7tzXT0F2WxUhTproLBs36i0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id CD727F8054A; Mon, 25 Jul 2022 12:09:29 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7F128F802DF; Mon, 25 Jul 2022 12:09:27 +0200 (CEST) Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 09F4AF802DF for ; Mon, 25 Jul 2022 12:09:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 09F4AF802DF Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="s1t0vh6v" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1658743758; x=1690279758; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WwU9nxdctQsI4jH9K6IXqln2aORb9QSIuV6qe2LWzS8=; b=s1t0vh6vy/EpXWtkWZe+AYMrP5W/lydGi9/0IHTbsc6bB0AqHYonNYsm YXPCiUM5LyzNXyPg/sq7MOSEvUiu2+AvSjdnJRPDMG+VrcTVHdP/It/Su zKDwhQ/OvCGd9l28Y37qQbqmPUNXqSU+eLziJvDM6JdBSpOXehuqqKFmz JWKtUM81PHfUSTBHjhGx2ToRkC9ED/pQNblmpfUoRFYZFwMQEyOyVh74h E9qmbPbTkiL2upR/99+Hv9eSjkIsPUZx8nGrz4VTNGKjIW1wsNQoA/EIG 6smQL/YDNVGa4xS3aN18IBKgopCTEqN5ha9vxgkJETu32Upk3zoFh0R1i g==; X-IronPort-AV: E=Sophos;i="5.93,192,1654585200"; d="scan'208";a="173666606" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Jul 2022 03:09:17 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Mon, 25 Jul 2022 03:09:17 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Mon, 25 Jul 2022 03:09:14 -0700 From: Claudiu Beznea To: , , , , , Subject: [PATCH 4/5] ASoC: mchp-spdiftx: return directly ret Date: Mon, 25 Jul 2022 13:11:29 +0300 Message-ID: <20220725101130.1780393-5-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220725101130.1780393-1-claudiu.beznea@microchip.com> References: <20220725101130.1780393-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea 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" Avoid having patterns like: int ret; // ... ret = 0; // ... ret = call_function(); if (ret) return ret; return 0; and return directly ret for all cases. Signed-off-by: Claudiu Beznea --- sound/soc/atmel/mchp-spdiftx.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/sound/soc/atmel/mchp-spdiftx.c b/sound/soc/atmel/mchp-spdiftx.c index 20e77b374f7e..74729ec8423b 100644 --- a/sound/soc/atmel/mchp-spdiftx.c +++ b/sound/soc/atmel/mchp-spdiftx.c @@ -340,12 +340,10 @@ static int mchp_spdiftx_trigger(struct snd_pcm_substream *substream, int cmd, ret = regmap_write(dev->regmap, SPDIFTX_MR, mr); spin_unlock(&ctrl->lock); - if (ret) { + if (ret) dev_err(dev->dev, "unable to disable TX: %d\n", ret); - return ret; - } - return 0; + return ret; } static int mchp_spdiftx_hw_params(struct snd_pcm_substream *substream, @@ -841,12 +839,10 @@ static int mchp_spdiftx_probe(struct platform_device *pdev) err = devm_snd_soc_register_component(&pdev->dev, &mchp_spdiftx_component, &mchp_spdiftx_dai, 1); - if (err) { + if (err) dev_err(&pdev->dev, "failed to register component: %d\n", err); - return err; - } - return 0; + return err; } static struct platform_driver mchp_spdiftx_driver = { From patchwork Mon Jul 25 10:11:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12927950 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 76C61C433EF for ; Mon, 25 Jul 2022 10:11:42 +0000 (UTC) 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 5B6F8844; Mon, 25 Jul 2022 12:10:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5B6F8844 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1658743900; bh=zVQNjZCZbrx7YBoEsGRPaUn9ETcmC+pt2UNxfnvHVEk=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=hId4qo0X40yalVkmi1ki0bc8nSTvD/X1X/RkmYvI1XSu4PBRHDZSHZxoSLc5/oJ/S qlVdu9Utwh+pt6H45u5eZ8R8Hn2aVFr5NMX1K3PUXmh52M8OTRXhHyORAN1dYSR89x VOJYbLJfHwl5IaNMiCDwOreA4Wv24Ak2ckXPxSEg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B4ACBF80559; Mon, 25 Jul 2022 12:09:38 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 95853F8055A; Mon, 25 Jul 2022 12:09:36 +0200 (CEST) Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 6E196F80539 for ; Mon, 25 Jul 2022 12:09:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6E196F80539 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="YrsDG6T4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1658743764; x=1690279764; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zVQNjZCZbrx7YBoEsGRPaUn9ETcmC+pt2UNxfnvHVEk=; b=YrsDG6T4tyXbZfQI4E+AdgukMwBZmj7Sk9KrOSFttwaLLkor5ig3ygme xSBwaq27RFkqKaNmgRF9asgHl+NoPs3LK0Xe0VthLoc5LRG7FS7WxhSin VaCZpDXNuaoyje6PYGvJgDwXZylLxeoLTSUkwMqh6VTRlQ0D33KdXSj1e X3WVb9EgY5CFbXuduzUM0ssv8RjQCrGx4KNAmEofzpglee+7ESeZ4zQG8 8GsAIu3uQ6NvhcQp5d9QKVH2B2A6Ms29tp0IkrnDMyH3HSupNFaKwWqXe w9LLmU/JuKGa+JEl/igzu2DetOGWjB0zpeCQJUn0eAB877zTVZ3kS11ni Q==; X-IronPort-AV: E=Sophos;i="5.93,192,1654585200"; d="scan'208";a="173496326" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Jul 2022 03:09:20 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Mon, 25 Jul 2022 03:09:19 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Mon, 25 Jul 2022 03:09:17 -0700 From: Claudiu Beznea To: , , , , , Subject: [PATCH 5/5] ASoC: mchp-spdiftx: add and remove black line around MODULE_DEVICE_TABLE() Date: Mon, 25 Jul 2022 13:11:30 +0300 Message-ID: <20220725101130.1780393-6-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220725101130.1780393-1-claudiu.beznea@microchip.com> References: <20220725101130.1780393-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea 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" Add blank line after MODULE_DEVICE_TABLE() and remove the one before it. Signed-off-by: Claudiu Beznea --- sound/soc/atmel/mchp-spdiftx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/atmel/mchp-spdiftx.c b/sound/soc/atmel/mchp-spdiftx.c index 74729ec8423b..e8f4ff1b7c7c 100644 --- a/sound/soc/atmel/mchp-spdiftx.c +++ b/sound/soc/atmel/mchp-spdiftx.c @@ -760,8 +760,8 @@ static const struct of_device_id mchp_spdiftx_dt_ids[] = { }, { /* sentinel */ } }; - MODULE_DEVICE_TABLE(of, mchp_spdiftx_dt_ids); + static int mchp_spdiftx_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node;