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: 3760111 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8D007BF13A for ; Tue, 4 Mar 2014 09:11:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AD082203DC for ; Tue, 4 Mar 2014 09:11:30 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 6E8B7203B6 for ; Tue, 4 Mar 2014 09:11:29 +0000 (UTC) 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.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 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: "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 X-Virus-Scanned: ClamAV using ClamSMTP 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: