diff mbox

ASoC: add SOC_VALUE_ENUM_EXT

Message ID 20140707121644.GA26105@opensource.wolfsonmicro.com (mailing list archive)
State Accepted
Commit 1e4c0d7c9a2b44e18fe9e93712672741f70e36da
Headers show

Commit Message

Richard Fitzgerald July 7, 2014, 12:16 p.m. UTC
Adds an equivalent of SOC_ENUM_EXT for value enums

Strictly speaking SOC_ENUM_EXT can also be used to define
a value enum since the only difference is the get and set
functions. But this doesn't look good in code because it is
inconsistent with the normal control definitions. Adding a
specific SOC_VALUE_ENUM_EXT is better for code clarity.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
---
 include/sound/soc.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Comments

Mark Brown July 7, 2014, 2:37 p.m. UTC | #1
On Mon, Jul 07, 2014 at 01:16:54PM +0100, Richard Fitzgerald wrote:
> Adds an equivalent of SOC_ENUM_EXT for value enums

Applied, thanks.
diff mbox

Patch

diff --git a/include/sound/soc.h b/include/sound/soc.h
index 9a5b4f6..1483920 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -248,6 +248,8 @@ 
 	.info = snd_soc_info_enum_double, \
 	.get = xhandler_get, .put = xhandler_put, \
 	.private_value = (unsigned long)&xenum }
+#define SOC_VALUE_ENUM_EXT(xname, xenum, xhandler_get, xhandler_put) \
+	SOC_ENUM_EXT(xname, xenum, xhandler_get, xhandler_put)
 
 #define SND_SOC_BYTES(xname, xbase, xregs)		      \
 {	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname,   \