From patchwork Tue Mar 4 09:10:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 25659 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f72.google.com (mail-yh0-f72.google.com [209.85.213.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C790F20540 for ; Tue, 4 Mar 2014 09:11:35 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id f73sf13755120yha.11 for ; Tue, 04 Mar 2014 01:11:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:cc:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=5NkLqWb71f1rPndUA87sg4EZDWbyKxm/6sHr1HJDU24=; b=aKJq/98FGG14Di8Fd10FCQsdhKW/uVzdFnhU8aKUrQps9abiQAGh51xr1rZaprF60G 6SZj1FIj9+nOyJBYBrSVLljuuVmtYJjdHpQzYm7r/KJZcWYY39H/S2W+GatVyMZxMaKY jNidRoI5vj2KxHyqQ7HI+aoQTKwj9y/HX3yQXxcwiLtp9C9Bn2UXd2XREE8z8F1GELkp ECaRcyBc0c6f9kxS2FBUeGBNY5Tnm5BDfGo8fjSh2/vu0+bnWIJbfdrG6U3Q2ERYuuyg TIGBK1rXPUvtN2gATnTr3XV2U7j/uzmPE1+1eL1OqOlB/sfonFG7zuG8lt9mLiM8la6+ mBAg== X-Gm-Message-State: ALoCoQnAVbgNInnLJz4JwHWelwtF46bLn7evGQPzpj3XNf4+1ecIDkVLLo8M8dK+WnQf0u4QloyK X-Received: by 10.58.235.34 with SMTP id uj2mr5061270vec.11.1393924295485; Tue, 04 Mar 2014 01:11:35 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.107.228 with SMTP id h91ls2433647qgf.76.gmail; Tue, 04 Mar 2014 01:11:35 -0800 (PST) X-Received: by 10.52.110.196 with SMTP id ic4mr3025134vdb.27.1393924295367; Tue, 04 Mar 2014 01:11:35 -0800 (PST) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id wg4si5650118vcb.38.2014.03.04.01.11.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Mar 2014 01:11:35 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id oz11so4451853veb.34 for ; Tue, 04 Mar 2014 01:11:35 -0800 (PST) X-Received: by 10.58.202.4 with SMTP id ke4mr20513667vec.7.1393924295289; Tue, 04 Mar 2014 01:11:35 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.130.193 with SMTP id u1csp113283vcs; Tue, 4 Mar 2014 01:11:34 -0800 (PST) X-Received: by 10.15.49.196 with SMTP id j44mr1549819eew.98.1393924294354; Tue, 04 Mar 2014 01:11:34 -0800 (PST) Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id a41si30185002eef.134.2014.03.04.01.11.33 for ; Tue, 04 Mar 2014 01:11:34 -0800 (PST) Received-SPF: neutral (google.com: 77.48.224.243 is neither permitted nor denied by best guess record for domain of alsa-devel-bounces@alsa-project.org) client-ip=77.48.224.243; Received: by alsa0.perex.cz (Postfix, from userid 1000) id 38DC9265767; Tue, 4 Mar 2014 10:11:28 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.2.4 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 0EC9126573E; Tue, 4 Mar 2014 10:11:18 +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 B25A826573E; Tue, 4 Mar 2014 10:11:16 +0100 (CET) Received: from mezzanine.sirena.org.uk (mezzanine.sirena.org.uk [106.187.55.193]) by alsa0.perex.cz (Postfix) with ESMTP id F096C26573F for ; Tue, 4 Mar 2014 10:11:08 +0100 (CET) Received: from z88l218.static.ctm.net ([202.175.88.218] helo=finisterre) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1WKlNR-0006m2-6u; Tue, 04 Mar 2014 09:11:07 +0000 Received: from broonie by finisterre with local (Exim 4.82) (envelope-from ) id 1WKlNH-0001lX-0F; Tue, 04 Mar 2014 17:10:55 +0800 From: Mark Brown To: Liam Girdwood Date: Tue, 4 Mar 2014 17:10:51 +0800 Message-Id: <1393924251-6754-1-git-send-email-broonie@kernel.org> X-Mailer: git-send-email 1.9.0 X-SA-Exim-Connect-IP: 202.175.88.218 X-SA-Exim-Mail-From: broonie@sirena.org.uk X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Cc: alsa-devel@alsa-project.org, linaro-kernel@lists.linaro.org, Mark Brown Subject: [alsa-devel] [PATCH] ASoC: io: Remove hw_read() operation X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: broonie@kernel.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Mark Brown We now no longer have any users of hw_read() in the kernel so remove the code in order to prevent any new users being added. Users should be using regmap. Signed-off-by: Mark Brown --- include/sound/soc.h | 1 - sound/soc/soc-io.c | 13 ------------- 2 files changed, 14 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 56c4c71..dc36331 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -706,7 +706,6 @@ struct snd_soc_codec { /* codec IO */ void *control_data; /* codec control (i2c/3wire) data */ hw_write_t hw_write; - unsigned int (*hw_read)(struct snd_soc_codec *, unsigned int); unsigned int (*read)(struct snd_soc_codec *, unsigned int); int (*write)(struct snd_soc_codec *, unsigned int, unsigned int); void *reg_cache; diff --git a/sound/soc/soc-io.c b/sound/soc/soc-io.c index c3b6a0a..3c1de9c 100644 --- a/sound/soc/soc-io.c +++ b/sound/soc/soc-io.c @@ -26,18 +26,6 @@ static int hw_write(struct snd_soc_codec *codec, unsigned int reg, return regmap_write(codec->control_data, reg, value); } -static unsigned int hw_read(struct snd_soc_codec *codec, unsigned int reg) -{ - int ret; - unsigned int val; - - ret = regmap_read(codec->control_data, reg, &val); - if (ret == 0) - return val; - else - return -1; -} - /** * snd_soc_codec_set_cache_io: Set up standard I/O functions. * @@ -64,7 +52,6 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec, int ret; codec->write = hw_write; - codec->read = hw_read; switch (control) { case SND_SOC_REGMAP: