From patchwork Mon Mar 12 17:01:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 131392 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp981656ljb; Mon, 12 Mar 2018 10:01:34 -0700 (PDT) X-Google-Smtp-Source: AG47ELuVcxj904WrDNQ6RSf+ke7g9xkt1Twbm2fptvDCiY5rlIp6EmAFinR1zdR1E5IeRql3mQWZ X-Received: by 10.223.163.93 with SMTP id d29mr7335355wrb.187.1520874094670; Mon, 12 Mar 2018 10:01:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520874094; cv=none; d=google.com; s=arc-20160816; b=idc97eByKyStOz8+Ae5FiOoj5HdTLUjpAcz8/x7HebAt+blJeRw2/OV5lwfy419ii1 YzrQzSzxzDck6XjVTqX5rc7Rrtf0AucZVo1MpmGOTLy7av3/WmcvhwDpo16wNFHvBBrz JmOcMXOVEmf/YlT3JW7/1kIfo3+FVuotTYh5iBX1yCTFh/Su4p4SX9ihcUaPdyNTBiOD 0S+pcDL5RpMc3n3mWw7VNPiyUNmx5wNGURlO3slv4VpZdTiK+ABpL0mqN8d0kBogCos7 ETv+znJp0mRpaMH8/PnKQETEF4fmxbMigGxPts7sU20U3rkpzRl6m5zSBpJwb480LyCm PCSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=Mm0WiK6t+3tLYxSOU/zEFjzrYfEew4ereIkSdmTiWdY=; b=eRs0PGj+mJpz6YtkjpbsUZOK/jtS6vIxwwo8gedy0/+ilzZiLm+K2OoNyZPJNcfBiS BooKdtyPZC+kD8rV/r0zdWyGVFHtDzhGyIvK0oMzeX5tf/xqTZc7lb37J5dmR9uqgVP6 nZJDaMz9iEU76jXwaZ0/KuOELe9QLzwJjx0YjxNdoW30m++7kncWtj/24Mc6JFbuc8DT FYao8ju2mAhG+cz2pve1sxj/d0oNfbUBioxnl8tyOZ37nQctGwrK2haNLGpOfYSZXTMk mBB+fBbQm2fX6/dPQrSOxd7vKoIEbkBUwSX7h9NjQ94ZOKFBMyNS6jz0eGqnMSQ3VxzS R50A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=H0BgEiwB; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id v7si5429548wrg.254.2018.03.12.10.01.34; Mon, 12 Mar 2018 10:01:34 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=H0BgEiwB; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 6D21526739E; Mon, 12 Mar 2018 18:01:33 +0100 (CET) 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 4AC4F267396; Mon, 12 Mar 2018 18:01:31 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 6ACDA267198 for ; Mon, 12 Mar 2018 18:01:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=CvIJHCCJqTENPg6OXnvH+GUxkiyPRY1472dxg9k2fx4=; b=H0BgEiwB1g7v VxEkM9W8QU6cxWcESDzvTqec/3sqso0WJqxqB9441Ra5pj7mgQnz7+vlCq+4XnrqNP3J05pDLuPod aCDAqVDHb26Ujmn5Q61pxEzUq8TystsUk4N1+Fu7ARnZJOWkcJtjLCWRpr9F3vbcOEl5ykn2SRxc+ mOkb4=; Received: from [67.208.111.18] (helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1evQpE-000686-Tn; Mon, 12 Mar 2018 17:01:29 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id F0C48440079; Mon, 12 Mar 2018 17:01:25 +0000 (GMT) From: Mark Brown To: Peter Ujfalusi In-Reply-To: <20180312142423.13177-3-peter.ujfalusi@ti.com> Message-Id: <20180312170125.F0C48440079@finisterre.ee.mobilebroadband> Date: Mon, 12 Mar 2018 17:01:25 +0000 (GMT) Cc: alsa-devel@alsa-project.org, Mark Brown , Liam Girdwood , lars@metafoo.de, kuninori.morimoto.gx@renesas.com Subject: [alsa-devel] Applied "ASoC: soc-io: Fix snd_soc_component_update_bits_legacy" to the asoc tree 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 The patch ASoC: soc-io: Fix snd_soc_component_update_bits_legacy has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From dead99e8579b6e2ebdf1e9c819e67d7f4a5cedbb Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Mon, 12 Mar 2018 16:24:23 +0200 Subject: [PATCH] ASoC: soc-io: Fix snd_soc_component_update_bits_legacy After the codec to component conversion codecs with custom read/write function will no longer able to use update_bits as their io callbacks are registered at component->driver level and not in component level. To not complicate the code further, lets just use the snd_soc_component_read/snd_soc_component_write function and let them sort out the correct io function to call. Fixes: d0ff8ba57d965 ("ASoC: add Component level .read/.write") Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown --- sound/soc/soc-io.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) -- 2.16.2 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/soc-io.c b/sound/soc/soc-io.c index 2bc1c4c17896..d36a192fbece 100644 --- a/sound/soc/soc-io.c +++ b/sound/soc/soc-io.c @@ -88,19 +88,16 @@ static int snd_soc_component_update_bits_legacy( unsigned int old, new; int ret; - if (!component->read || !component->write) - return -EIO; - mutex_lock(&component->io_mutex); - ret = component->read(component, reg, &old); + ret = snd_soc_component_read(component, reg, &old); if (ret < 0) goto out_unlock; new = (old & ~mask) | (val & mask); *change = old != new; if (*change) - ret = component->write(component, reg, new); + ret = snd_soc_component_write(component, reg, new); out_unlock: mutex_unlock(&component->io_mutex);