diff options
author | Richard Fitzgerald <rf@opensource.cirrus.com> | 2020-12-30 17:24:27 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-12-31 13:26:24 +0000 |
commit | f6212e0ab3ff28d4e2e53a520496a052c241df39 (patch) | |
tree | 952194d97caad89be26bc873f8312688e96fb805 /sound/soc/codecs/wmfw.h | |
parent | a0b653e89a3afd2a833f23589a83488fac842ddb (diff) |
ASoC: wm_adsp: Use snd_ctl_elem_type_t for control types
Sparse will complain about trying to convert between values declared
as snd_ctl_elem_type_t and other types. This patch converts to
consistently use snd_ctl_elem_type_t for control type values. A __force
cast is needed in a couple of cases where the control type value is
parsed out of a DSP data block.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20201230172427.13865-2-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/wmfw.h')
-rw-r--r-- | sound/soc/codecs/wmfw.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/wmfw.h b/sound/soc/codecs/wmfw.h index 7423272c30e9..f3d51602f85c 100644 --- a/sound/soc/codecs/wmfw.h +++ b/sound/soc/codecs/wmfw.h @@ -24,9 +24,9 @@ #define WMFW_CTL_FLAG_READABLE 0x0001 /* Non-ALSA coefficient types start at 0x1000 */ -#define WMFW_CTL_TYPE_ACKED 0x1000 /* acked control */ -#define WMFW_CTL_TYPE_HOSTEVENT 0x1001 /* event control */ -#define WMFW_CTL_TYPE_HOST_BUFFER 0x1002 /* host buffer pointer */ +#define WMFW_CTL_TYPE_ACKED ((__force snd_ctl_elem_type_t)0x1000) /* acked control */ +#define WMFW_CTL_TYPE_HOSTEVENT ((__force snd_ctl_elem_type_t)0x1001) /* event control */ +#define WMFW_CTL_TYPE_HOST_BUFFER ((__force snd_ctl_elem_type_t)0x1002) /* host buffer pointer */ struct wmfw_header { char magic[4]; |