aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/kernel/rtlx.c13
-rw-r--r--arch/mips/kernel/vpe.c2
-rw-r--r--arch/mips/lasat/picvue_proc.c2
3 files changed, 6 insertions, 11 deletions
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c
index b8c18dcdd2c4..88f7b50d541c 100644
--- a/arch/mips/kernel/rtlx.c
+++ b/arch/mips/kernel/rtlx.c
@@ -399,11 +399,9 @@ static int file_release(struct inode *inode, struct file *filp)
399 399
400static unsigned int file_poll(struct file *file, poll_table * wait) 400static unsigned int file_poll(struct file *file, poll_table * wait)
401{ 401{
402 int minor; 402 int minor = iminor(file_inode(file));
403 unsigned int mask = 0; 403 unsigned int mask = 0;
404 404
405 minor = iminor(file->f_path.dentry->d_inode);
406
407 poll_wait(file, &channel_wqs[minor].rt_queue, wait); 405 poll_wait(file, &channel_wqs[minor].rt_queue, wait);
408 poll_wait(file, &channel_wqs[minor].lx_queue, wait); 406 poll_wait(file, &channel_wqs[minor].lx_queue, wait);
409 407
@@ -424,7 +422,7 @@ static unsigned int file_poll(struct file *file, poll_table * wait)
424static ssize_t file_read(struct file *file, char __user * buffer, size_t count, 422static ssize_t file_read(struct file *file, char __user * buffer, size_t count,
425 loff_t * ppos) 423 loff_t * ppos)
426{ 424{
427 int minor = iminor(file->f_path.dentry->d_inode); 425 int minor = iminor(file_inode(file));
428 426
429 /* data available? */ 427 /* data available? */
430 if (!rtlx_read_poll(minor, (file->f_flags & O_NONBLOCK) ? 0 : 1)) { 428 if (!rtlx_read_poll(minor, (file->f_flags & O_NONBLOCK) ? 0 : 1)) {
@@ -437,11 +435,8 @@ static ssize_t file_read(struct file *file, char __user * buffer, size_t count,
437static ssize_t file_write(struct file *file, const char __user * buffer, 435static ssize_t file_write(struct file *file, const char __user * buffer,
438 size_t count, loff_t * ppos) 436 size_t count, loff_t * ppos)
439{ 437{
440 int minor; 438 int minor = iminor(file_inode(file));
441 struct rtlx_channel *rt; 439 struct rtlx_channel *rt = &rtlx->channel[minor];
442
443 minor = iminor(file->f_path.dentry->d_inode);
444 rt = &rtlx->channel[minor];
445 440
446 /* any space left... */ 441 /* any space left... */
447 if (!rtlx_write_poll(minor)) { 442 if (!rtlx_write_poll(minor)) {
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c
index eec690af6581..d75a5289d9b3 100644
--- a/arch/mips/kernel/vpe.c
+++ b/arch/mips/kernel/vpe.c
@@ -1149,7 +1149,7 @@ static ssize_t vpe_write(struct file *file, const char __user * buffer,
1149 size_t ret = count; 1149 size_t ret = count;
1150 struct vpe *v; 1150 struct vpe *v;
1151 1151
1152 if (iminor(file->f_path.dentry->d_inode) != minor) 1152 if (iminor(file_inode(file)) != minor)
1153 return -ENODEV; 1153 return -ENODEV;
1154 1154
1155 v = get_vpe(tclimit); 1155 v = get_vpe(tclimit);
diff --git a/arch/mips/lasat/picvue_proc.c b/arch/mips/lasat/picvue_proc.c
index 8e388da1926f..c592bc8b8c99 100644
--- a/arch/mips/lasat/picvue_proc.c
+++ b/arch/mips/lasat/picvue_proc.c
@@ -64,7 +64,7 @@ static int pvc_line_proc_open(struct inode *inode, struct file *file)
64static ssize_t pvc_line_proc_write(struct file *file, const char __user *buf, 64static ssize_t pvc_line_proc_write(struct file *file, const char __user *buf,
65 size_t count, loff_t *pos) 65 size_t count, loff_t *pos)
66{ 66{
67 int lineno = *(int *)PDE(file->f_path.dentry->d_inode)->data; 67 int lineno = *(int *)PDE(file_inode(file))->data;
68 char kbuf[PVC_LINELEN]; 68 char kbuf[PVC_LINELEN];
69 size_t len; 69 size_t len;
70 70