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
parentb35aabd78ddae8300fda7e6a1ac6f0484ef3e804 (diff)
parentc302d6133c094bda7a7ce94eac5b50c018a7ca7b (diff)
downloadlinux-05288426908ecb7ed7cbff61901db5918525578a.tar.gz
linux-05288426908ecb7ed7cbff61901db5918525578a.tar.bz2
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),