diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-03-01 14:38:49 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-03-01 14:38:49 +0300 |
commit | 12c2a682b55a40f2a986e36d6632110029bc63a5 (patch) | |
tree | ba21f049e4859411f6c135d597dc26260963ce7c /sound/core/control.c | |
parent | a86ba28583987b85845ed61be5f12aafb5fc4971 (diff) | |
parent | aefbd3e823d4fe219bb6420b0cac505847270507 (diff) | |
download | linux-12c2a682b55a40f2a986e36d6632110029bc63a5.tar.xz |
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, access = ncontrol->access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE : (ncontrol->access & (SNDRV_CTL_ELEM_ACCESS_READWRITE| SNDRV_CTL_ELEM_ACCESS_INACTIVE| - SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE| - SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK)); + SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE| + SNDRV_CTL_ELEM_ACCESS_TLV_COMMAND| + SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK)); kctl.info = ncontrol->info; kctl.get = ncontrol->get; kctl.put = ncontrol->put; @@ -1099,7 +1100,7 @@ static int snd_ctl_tlv_ioctl(struct snd_ctl_file *file, if (copy_from_user(&tlv, _tlv, sizeof(tlv))) return -EFAULT; - if (tlv.length < sizeof(unsigned int) * 3) + if (tlv.length < sizeof(unsigned int) * 2) return -EINVAL; down_read(&card->controls_rwsem); kctl = snd_ctl_find_numid(card, tlv.numid); |