From: Richard Fitzgerald Date: Mon, 7 Jul 2014 12:16:54 +0000 (+0100) Subject: ASoC: add SOC_VALUE_ENUM_EXT X-Git-Tag: v3.17-rc1~10^2~15^2~15^2~2 X-Git-Url: http://git.cascardo.info/?a=commitdiff_plain;h=1e4c0d7c9a2b44e18fe9e93712672741f70e36da;p=cascardo%2Flinux.git ASoC: add SOC_VALUE_ENUM_EXT 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 Signed-off-by: Mark Brown --- diff --git a/include/sound/soc.h b/include/sound/soc.h index ed9e2d7e5fdc..5d812cfe9427 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, \