diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-09-11 16:46:36 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-09-11 16:46:36 +0200 |
commit | 05288426908ecb7ed7cbff61901db5918525578a (patch) | |
tree | 94a814cfdd53a011a10da09201ed08a6572175ff /sound/core | |
parent | b35aabd78ddae8300fda7e6a1ac6f0484ef3e804 (diff) | |
parent | c302d6133c094bda7a7ce94eac5b50c018a7ca7b (diff) | |
download | op-kernel-dev-05288426908ecb7ed7cbff61901db5918525578a.zip op-kernel-dev-05288426908ecb7ed7cbff61901db5918525578a.tar.gz |
Merge branch 'for-linus' into for-next
To merge HD-audio fixes back to 3.7 development line
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/compress_offload.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c index ec2118d..eb60cb8 100644 --- a/sound/core/compress_offload.c +++ b/sound/core/compress_offload.c @@ -80,14 +80,12 @@ static int snd_compr_open(struct inode *inode, struct file *f) int maj = imajor(inode); int ret; - if (f->f_flags & O_WRONLY) + if ((f->f_flags & O_ACCMODE) == O_WRONLY) dirn = SND_COMPRESS_PLAYBACK; - else if (f->f_flags & O_RDONLY) + else if ((f->f_flags & O_ACCMODE) == O_RDONLY) dirn = SND_COMPRESS_CAPTURE; - else { - pr_err("invalid direction\n"); + else return -EINVAL; - } if (maj == snd_major) compr = snd_lookup_minor_data(iminor(inode), |