diff options
author | Fabio Estevam <fabio.estevam@nxp.com> | 2018-02-14 10:39:05 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-02-14 11:17:05 -0500 |
commit | 33d9245c6092336420c67f761b3bdcdd6c7c1d5d (patch) | |
tree | b398458abb69e0bb5b395bddc480bb3f37847742 | |
parent | 7928b2cbe55b2a410a0f5c1f154610059c57b1b2 (diff) |
ASoC: soc-dapm: Use empty struct initializer
{ NULL } only clears the first member of the structure.
Even though the first member of the snd_soc_dapm_update struct is a
pointer,it is more robust to use the empty struct initializer that
clears all the struct members.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/soc-dapm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 92894d9cac19..2f34590bcb72 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -3165,7 +3165,7 @@ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol, | |||
3165 | unsigned int invert = mc->invert; | 3165 | unsigned int invert = mc->invert; |
3166 | unsigned int val, rval = 0; | 3166 | unsigned int val, rval = 0; |
3167 | int connect, rconnect = -1, change, reg_change = 0; | 3167 | int connect, rconnect = -1, change, reg_change = 0; |
3168 | struct snd_soc_dapm_update update = { NULL }; | 3168 | struct snd_soc_dapm_update update = {}; |
3169 | int ret = 0; | 3169 | int ret = 0; |
3170 | 3170 | ||
3171 | val = (ucontrol->value.integer.value[0] & mask); | 3171 | val = (ucontrol->value.integer.value[0] & mask); |
@@ -3292,7 +3292,7 @@ int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol, | |||
3292 | unsigned int *item = ucontrol->value.enumerated.item; | 3292 | unsigned int *item = ucontrol->value.enumerated.item; |
3293 | unsigned int val, change, reg_change = 0; | 3293 | unsigned int val, change, reg_change = 0; |
3294 | unsigned int mask; | 3294 | unsigned int mask; |
3295 | struct snd_soc_dapm_update update = { NULL }; | 3295 | struct snd_soc_dapm_update update = {}; |
3296 | int ret = 0; | 3296 | int ret = 0; |
3297 | 3297 | ||
3298 | if (item[0] >= e->items) | 3298 | if (item[0] >= e->items) |