From: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>,
Liam Girdwood <lrg@slimlogic.co.uk>
Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com
Subject: [PATCH] ASoC: soc-core: Remove display_register() callback
Date: Wed, 2 Feb 2011 10:20:54 +0000 [thread overview]
Message-ID: <1296642054-10485-1-git-send-email-dp@opensource.wolfsonmicro.com> (raw)
Remove the display_register() callback as there are no users of it
in the upstream kernel and makes it difficult to unify the format
of the codec_reg file.
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
---
include/sound/soc.h | 2 --
sound/soc/soc-core.c | 31 +++++++++++++------------------
2 files changed, 13 insertions(+), 20 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 4b6c0a8..2e6463f 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -536,8 +536,6 @@ struct snd_soc_codec_driver {
/* codec IO */
unsigned int (*read)(struct snd_soc_codec *, unsigned int);
int (*write)(struct snd_soc_codec *, unsigned int, unsigned int);
- int (*display_register)(struct snd_soc_codec *, char *,
- size_t, unsigned int);
int (*volatile_register)(struct snd_soc_codec *, unsigned int);
int (*readable_register)(struct snd_soc_codec *, unsigned int);
short reg_cache_size;
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 205cbd7..4c061c3 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -110,24 +110,19 @@ static ssize_t soc_codec_reg_show(struct snd_soc_codec *codec, char *buf)
if (count >= PAGE_SIZE - 1)
break;
- if (codec->driver->display_register) {
- count += codec->driver->display_register(codec, buf + count,
- PAGE_SIZE - count, i);
- } else {
- /* If the read fails it's almost certainly due to
- * the register being volatile and the device being
- * powered off.
- */
- ret = snd_soc_read(codec, i);
- if (ret >= 0)
- count += snprintf(buf + count,
- PAGE_SIZE - count,
- "%.*x", wordsize, ret);
- else
- count += snprintf(buf + count,
- PAGE_SIZE - count,
- "<no data: %d>", ret);
- }
+ /* If the read fails it's almost certainly due to
+ * the register being volatile and the device being
+ * powered off.
+ */
+ ret = snd_soc_read(codec, i);
+ if (ret >= 0)
+ count += snprintf(buf + count,
+ PAGE_SIZE - count,
+ "%.*x", wordsize, ret);
+ else
+ count += snprintf(buf + count,
+ PAGE_SIZE - count,
+ "<no data: %d>", ret);
if (count >= PAGE_SIZE - 1)
break;
--
1.7.3.5
next reply other threads:[~2011-02-02 10:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-02 10:20 Dimitris Papastamos [this message]
2011-02-02 10:23 ` [PATCH] ASoC: soc-core: Remove display_register() callback Mark Brown
2011-02-02 14:50 ` jonsmirl
2011-02-02 14:51 ` Mark Brown
2011-02-02 14:54 ` Dimitris Papastamos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1296642054-10485-1-git-send-email-dp@opensource.wolfsonmicro.com \
--to=dp@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@slimlogic.co.uk \
--cc=patches@opensource.wolfsonmicro.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).