summaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-09-11 16:46:36 +0200
committerTakashi Iwai <tiwai@suse.de>2012-09-11 16:46:36 +0200
commit05288426908ecb7ed7cbff61901db5918525578a (patch)
tree94a814cfdd53a011a10da09201ed08a6572175ff /sound/core
parentALSA: hda - Replace with the generic fixup codes in patch_cirrus.c (diff)
parentALSA: hda_intel: add position_fix quirk for Asus K53E (diff)
downloadlinux-05288426908ecb7ed7cbff61901db5918525578a.tar.xz
linux-05288426908ecb7ed7cbff61901db5918525578a.zip
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.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index ec2118d0e27a..eb60cb8dbb8a 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),