From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@kernel.org>
Cc: Brian Austin <brian.austin@cirrus.com>,
alsa-devel@alsa-project.org, Liam Girdwood <lgirdwood@gmail.com>,
Paul Handrigan <Paul.Handrigan@cirrus.com>,
Tim Howe <tim.howe@cirrus.com>
Subject: [PATCH 1/2] ASoC: cs4349: Fix max_register setting for cs4349_regmap
Date: Fri, 17 Jul 2015 23:38:34 +0800 [thread overview]
Message-ID: <1437147514.1229.1.camel@ingics.com> (raw)
The max_register should be the maximum valid register index rather than
number of registers. Also remove unused defines.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
sound/soc/codecs/cs4349.c | 2 +-
sound/soc/codecs/cs4349.h | 3 ---
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/codecs/cs4349.c b/sound/soc/codecs/cs4349.c
index a8df8a74..9273b06 100644
--- a/sound/soc/codecs/cs4349.c
+++ b/sound/soc/codecs/cs4349.c
@@ -268,7 +268,7 @@ static struct regmap_config cs4349_regmap = {
.reg_bits = 8,
.val_bits = 8,
- .max_register = CS4349_NUMREGS,
+ .max_register = CS4349_MISC,
.reg_defaults = cs4349_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(cs4349_reg_defaults),
.readable_reg = cs4349_readable_register,
diff --git a/sound/soc/codecs/cs4349.h b/sound/soc/codecs/cs4349.h
index 3884a89..7effa0a 100644
--- a/sound/soc/codecs/cs4349.h
+++ b/sound/soc/codecs/cs4349.h
@@ -36,9 +36,6 @@ struct cs4349_platform_data {
#define CS4349_RMPFLT 0x07 /* Ramp and Filter Control */
#define CS4349_MISC 0x08 /* Power Down,Freeze Control,Pop Stop*/
-#define CS4349_FIRSTREG 0x01
-#define CS4349_LASTREG 0x08
-#define CS4349_NUMREGS (CS4349_LASTREG - CS4349_FIRSTREG + 1)
#define CS4349_I2C_INCR 0x80
--
2.1.0
next reply other threads:[~2015-07-17 15:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-17 15:38 Axel Lin [this message]
2015-07-17 15:43 ` [PATCH 2/2] ASoC: cs4349: Constify cs4349_regmap Axel Lin
2015-07-20 17:52 ` Applied "ASoC: cs4349: Constify cs4349_regmap" to the asoc tree Mark Brown
2015-07-17 19:57 ` [PATCH 1/2] ASoC: cs4349: Fix max_register setting for cs4349_regmap Tim Howe
2015-07-20 17:52 ` Applied "ASoC: cs4349: Fix max_register setting for cs4349_regmap" to the asoc tree Mark Brown
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=1437147514.1229.1.camel@ingics.com \
--to=axel.lin@ingics.com \
--cc=Paul.Handrigan@cirrus.com \
--cc=alsa-devel@alsa-project.org \
--cc=brian.austin@cirrus.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=tim.howe@cirrus.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.