diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-03-01 06:38:49 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-03-01 06:38:49 -0500 |
commit | 12c2a682b55a40f2a986e36d6632110029bc63a5 (patch) | |
tree | ba21f049e4859411f6c135d597dc26260963ce7c /sound/core/control.c | |
parent | a86ba28583987b85845ed61be5f12aafb5fc4971 (diff) | |
parent | aefbd3e823d4fe219bb6420b0cac505847270507 (diff) |
Merge branch 'topic/misc' into for-linus
Diffstat (limited to 'sound/core/control.c')
-rw-r--r-- | sound/core/control.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/core/control.c b/sound/core/control.c index 268ab7471224..439ce64f9d82 100644 --- a/sound/core/control.c +++ b/sound/core/control.c | |||
@@ -237,8 +237,9 @@ struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new *ncontrol, | |||
237 | access = ncontrol->access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE : | 237 | access = ncontrol->access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE : |
238 | (ncontrol->access & (SNDRV_CTL_ELEM_ACCESS_READWRITE| | 238 | (ncontrol->access & (SNDRV_CTL_ELEM_ACCESS_READWRITE| |
239 | SNDRV_CTL_ELEM_ACCESS_INACTIVE| | 239 | SNDRV_CTL_ELEM_ACCESS_INACTIVE| |
240 | SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE| | 240 | SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE| |
241 | SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK)); | 241 | SNDRV_CTL_ELEM_ACCESS_TLV_COMMAND| |
242 | SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK)); | ||
242 | kctl.info = ncontrol->info; | 243 | kctl.info = ncontrol->info; |
243 | kctl.get = ncontrol->get; | 244 | kctl.get = ncontrol->get; |
244 | kctl.put = ncontrol->put; | 245 | kctl.put = ncontrol->put; |
@@ -1099,7 +1100,7 @@ static int snd_ctl_tlv_ioctl(struct snd_ctl_file *file, | |||
1099 | 1100 | ||
1100 | if (copy_from_user(&tlv, _tlv, sizeof(tlv))) | 1101 | if (copy_from_user(&tlv, _tlv, sizeof(tlv))) |
1101 | return -EFAULT; | 1102 | return -EFAULT; |
1102 | if (tlv.length < sizeof(unsigned int) * 3) | 1103 | if (tlv.length < sizeof(unsigned int) * 2) |
1103 | return -EINVAL; | 1104 | return -EINVAL; |
1104 | down_read(&card->controls_rwsem); | 1105 | down_read(&card->controls_rwsem); |
1105 | kctl = snd_ctl_find_numid(card, tlv.numid); | 1106 | kctl = snd_ctl_find_numid(card, tlv.numid); |