aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-09-11 10:46:36 -0400
committerTakashi Iwai <tiwai@suse.de>2012-09-11 10:46:36 -0400
commit05288426908ecb7ed7cbff61901db5918525578a (patch)
tree94a814cfdd53a011a10da09201ed08a6572175ff /sound/core
parentb35aabd78ddae8300fda7e6a1ac6f0484ef3e804 (diff)
parentc302d6133c094bda7a7ce94eac5b50c018a7ca7b (diff)
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 ec2118d0e27..eb60cb8dbb8 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)
80 int maj = imajor(inode); 80 int maj = imajor(inode);
81 int ret; 81 int ret;
82 82
83 if (f->f_flags & O_WRONLY) 83 if ((f->f_flags & O_ACCMODE) == O_WRONLY)
84 dirn = SND_COMPRESS_PLAYBACK; 84 dirn = SND_COMPRESS_PLAYBACK;
85 else if (f->f_flags & O_RDONLY) 85 else if ((f->f_flags & O_ACCMODE) == O_RDONLY)
86 dirn = SND_COMPRESS_CAPTURE; 86 dirn = SND_COMPRESS_CAPTURE;
87 else { 87 else
88 pr_err("invalid direction\n");
89 return -EINVAL; 88 return -EINVAL;
90 }
91 89
92 if (maj == snd_major) 90 if (maj == snd_major)
93 compr = snd_lookup_minor_data(iminor(inode), 91 compr = snd_lookup_minor_data(iminor(inode),