diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-01-23 17:07:38 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-22 23:31:31 -0500 |
commit | 496ad9aa8ef448058e36ca7a787c61f2e63f0f54 (patch) | |
tree | 8f4abde793cd7db5bb8fde6d27ebcacd0e54379a /sound/oss | |
parent | 57eccb830f1cc93d4b506ba306d8dfa685e0c88f (diff) |
new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'sound/oss')
-rw-r--r-- | sound/oss/msnd_pinnacle.c | 6 | ||||
-rw-r--r-- | sound/oss/soundcard.c | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sound/oss/msnd_pinnacle.c b/sound/oss/msnd_pinnacle.c index 536c4c0514d3..11ff7c55240c 100644 --- a/sound/oss/msnd_pinnacle.c +++ b/sound/oss/msnd_pinnacle.c | |||
@@ -642,7 +642,7 @@ static int mixer_ioctl(unsigned int cmd, unsigned long arg) | |||
642 | 642 | ||
643 | static long dev_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | 643 | static long dev_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
644 | { | 644 | { |
645 | int minor = iminor(file->f_path.dentry->d_inode); | 645 | int minor = iminor(file_inode(file)); |
646 | int ret; | 646 | int ret; |
647 | 647 | ||
648 | if (cmd == OSS_GETVERSION) { | 648 | if (cmd == OSS_GETVERSION) { |
@@ -1012,7 +1012,7 @@ static int dsp_write(const char __user *buf, size_t len) | |||
1012 | 1012 | ||
1013 | static ssize_t dev_read(struct file *file, char __user *buf, size_t count, loff_t *off) | 1013 | static ssize_t dev_read(struct file *file, char __user *buf, size_t count, loff_t *off) |
1014 | { | 1014 | { |
1015 | int minor = iminor(file->f_path.dentry->d_inode); | 1015 | int minor = iminor(file_inode(file)); |
1016 | if (minor == dev.dsp_minor) | 1016 | if (minor == dev.dsp_minor) |
1017 | return dsp_read(buf, count); | 1017 | return dsp_read(buf, count); |
1018 | else | 1018 | else |
@@ -1021,7 +1021,7 @@ static ssize_t dev_read(struct file *file, char __user *buf, size_t count, loff_ | |||
1021 | 1021 | ||
1022 | static ssize_t dev_write(struct file *file, const char __user *buf, size_t count, loff_t *off) | 1022 | static ssize_t dev_write(struct file *file, const char __user *buf, size_t count, loff_t *off) |
1023 | { | 1023 | { |
1024 | int minor = iminor(file->f_path.dentry->d_inode); | 1024 | int minor = iminor(file_inode(file)); |
1025 | if (minor == dev.dsp_minor) | 1025 | if (minor == dev.dsp_minor) |
1026 | return dsp_write(buf, count); | 1026 | return dsp_write(buf, count); |
1027 | else | 1027 | else |
diff --git a/sound/oss/soundcard.c b/sound/oss/soundcard.c index 7c7793a0eb25..e7780349cc55 100644 --- a/sound/oss/soundcard.c +++ b/sound/oss/soundcard.c | |||
@@ -143,7 +143,7 @@ static int get_mixer_levels(void __user * arg) | |||
143 | 143 | ||
144 | static ssize_t sound_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) | 144 | static ssize_t sound_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) |
145 | { | 145 | { |
146 | int dev = iminor(file->f_path.dentry->d_inode); | 146 | int dev = iminor(file_inode(file)); |
147 | int ret = -EINVAL; | 147 | int ret = -EINVAL; |
148 | 148 | ||
149 | /* | 149 | /* |
@@ -176,7 +176,7 @@ static ssize_t sound_read(struct file *file, char __user *buf, size_t count, lof | |||
176 | 176 | ||
177 | static ssize_t sound_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) | 177 | static ssize_t sound_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) |
178 | { | 178 | { |
179 | int dev = iminor(file->f_path.dentry->d_inode); | 179 | int dev = iminor(file_inode(file)); |
180 | int ret = -EINVAL; | 180 | int ret = -EINVAL; |
181 | 181 | ||
182 | mutex_lock(&soundcard_mutex); | 182 | mutex_lock(&soundcard_mutex); |
@@ -333,7 +333,7 @@ static int sound_mixer_ioctl(int mixdev, unsigned int cmd, void __user *arg) | |||
333 | static long sound_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | 333 | static long sound_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
334 | { | 334 | { |
335 | int len = 0, dtype; | 335 | int len = 0, dtype; |
336 | int dev = iminor(file->f_dentry->d_inode); | 336 | int dev = iminor(file_inode(file)); |
337 | long ret = -EINVAL; | 337 | long ret = -EINVAL; |
338 | void __user *p = (void __user *)arg; | 338 | void __user *p = (void __user *)arg; |
339 | 339 | ||
@@ -406,7 +406,7 @@ static long sound_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
406 | 406 | ||
407 | static unsigned int sound_poll(struct file *file, poll_table * wait) | 407 | static unsigned int sound_poll(struct file *file, poll_table * wait) |
408 | { | 408 | { |
409 | struct inode *inode = file->f_path.dentry->d_inode; | 409 | struct inode *inode = file_inode(file); |
410 | int dev = iminor(inode); | 410 | int dev = iminor(inode); |
411 | 411 | ||
412 | DEB(printk("sound_poll(dev=%d)\n", dev)); | 412 | DEB(printk("sound_poll(dev=%d)\n", dev)); |
@@ -431,7 +431,7 @@ static int sound_mmap(struct file *file, struct vm_area_struct *vma) | |||
431 | int dev_class; | 431 | int dev_class; |
432 | unsigned long size; | 432 | unsigned long size; |
433 | struct dma_buffparms *dmap = NULL; | 433 | struct dma_buffparms *dmap = NULL; |
434 | int dev = iminor(file->f_path.dentry->d_inode); | 434 | int dev = iminor(file_inode(file)); |
435 | 435 | ||
436 | dev_class = dev & 0x0f; | 436 | dev_class = dev & 0x0f; |
437 | dev >>= 4; | 437 | dev >>= 4; |