diff options
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 4e53d87e881d..be88df5eeaf7 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -3212,11 +3212,11 @@ int snd_soc_bytes_get(struct snd_kcontrol *kcontrol, | |||
3212 | break; | 3212 | break; |
3213 | case 2: | 3213 | case 2: |
3214 | ((u16 *)(&ucontrol->value.bytes.data))[0] | 3214 | ((u16 *)(&ucontrol->value.bytes.data))[0] |
3215 | &= ~params->mask; | 3215 | &= cpu_to_be16(~params->mask); |
3216 | break; | 3216 | break; |
3217 | case 4: | 3217 | case 4: |
3218 | ((u32 *)(&ucontrol->value.bytes.data))[0] | 3218 | ((u32 *)(&ucontrol->value.bytes.data))[0] |
3219 | &= ~params->mask; | 3219 | &= cpu_to_be32(~params->mask); |
3220 | break; | 3220 | break; |
3221 | default: | 3221 | default: |
3222 | return -EINVAL; | 3222 | return -EINVAL; |
@@ -4617,10 +4617,14 @@ int snd_soc_of_get_dai_name(struct device_node *of_node, | |||
4617 | 4617 | ||
4618 | if (id < 0 || id >= pos->num_dai) { | 4618 | if (id < 0 || id >= pos->num_dai) { |
4619 | ret = -EINVAL; | 4619 | ret = -EINVAL; |
4620 | } else { | 4620 | break; |
4621 | *dai_name = pos->dai_drv[id].name; | ||
4622 | ret = 0; | ||
4623 | } | 4621 | } |
4622 | |||
4623 | ret = 0; | ||
4624 | |||
4625 | *dai_name = pos->dai_drv[id].name; | ||
4626 | if (!*dai_name) | ||
4627 | *dai_name = pos->name; | ||
4624 | } | 4628 | } |
4625 | 4629 | ||
4626 | break; | 4630 | break; |