]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ASoC: soc-dapm: Use empty struct initializer
authorFabio Estevam <fabio.estevam@nxp.com>
Wed, 14 Feb 2018 15:39:05 +0000 (13:39 -0200)
committerMark Brown <broonie@kernel.org>
Wed, 14 Feb 2018 16:17:05 +0000 (16:17 +0000)
{ 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>
sound/soc/soc-dapm.c

index 92894d9cac19d54d835b6611c013b0ea527403a8..2f34590bcb72c2b6420a0c0c578091e8800f253a 100644 (file)
@@ -3165,7 +3165,7 @@ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol,
        unsigned int invert = mc->invert;
        unsigned int val, rval = 0;
        int connect, rconnect = -1, change, reg_change = 0;
-       struct snd_soc_dapm_update update = { NULL };
+       struct snd_soc_dapm_update update = {};
        int ret = 0;
 
        val = (ucontrol->value.integer.value[0] & mask);
@@ -3292,7 +3292,7 @@ int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol,
        unsigned int *item = ucontrol->value.enumerated.item;
        unsigned int val, change, reg_change = 0;
        unsigned int mask;
-       struct snd_soc_dapm_update update = { NULL };
+       struct snd_soc_dapm_update update = {};
        int ret = 0;
 
        if (item[0] >= e->items)