aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/rtlx.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-04-27 17:24:49 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-27 17:24:49 -0400
commita9aa0e24f7ed5acf2e0e1799fb28daf928293ba1 (patch)
tree38782b91d531c8d98b81372a7c964fa2c924b90f /arch/mips/kernel/rtlx.c
parent7c1c3eb855b5311118bed3b51c79d652d40148ec (diff)
parentee1cca1b0661fa33fd99f2d8ec7e2749432f9b1d (diff)
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] Fix branch emulation for floating-point exceptions. [MIPS] Cleanup inode->r_dev usage. [MIPS] Update MIPS defconfigs. [MIPS] Get rid of CONFIG_ADVANCED. [MIPS] Kconfig: Clarify description of CROSSCOMPILE. [MIPS] 24K LV: Add core card id. [MIPS] Sparse: fix sparse for 64-bit kernels. [MIPS] Use __ffs() instead of ffs() in ip32_irq0(). [MIPS] Fix bitops for MIPS32/MIPS64 CPUs. [MIPS] Fix ip27 build. [MIPS] Oprofile: fix sparse warning. [MIPS] Fix oprofile module unloading
Diffstat (limited to 'arch/mips/kernel/rtlx.c')
-rw-r--r--arch/mips/kernel/rtlx.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c
index 6179805af9f0..caf777f83289 100644
--- a/arch/mips/kernel/rtlx.c
+++ b/arch/mips/kernel/rtlx.c
@@ -398,15 +398,14 @@ ssize_t rtlx_write(int index, void *buffer, size_t count, int user)
398 398
399static int file_open(struct inode *inode, struct file *filp) 399static int file_open(struct inode *inode, struct file *filp)
400{ 400{
401 int minor = MINOR(inode->i_rdev); 401 int minor = iminor(inode);
402 402
403 return rtlx_open(minor, (filp->f_flags & O_NONBLOCK) ? 0 : 1); 403 return rtlx_open(minor, (filp->f_flags & O_NONBLOCK) ? 0 : 1);
404} 404}
405 405
406static int file_release(struct inode *inode, struct file *filp) 406static int file_release(struct inode *inode, struct file *filp)
407{ 407{
408 int minor; 408 int minor = iminor(inode);
409 minor = MINOR(inode->i_rdev);
410 409
411 return rtlx_release(minor); 410 return rtlx_release(minor);
412} 411}
@@ -416,7 +415,7 @@ static unsigned int file_poll(struct file *file, poll_table * wait)
416 int minor; 415 int minor;
417 unsigned int mask = 0; 416 unsigned int mask = 0;
418 417
419 minor = MINOR(file->f_dentry->d_inode->i_rdev); 418 minor = iminor(file->f_dentry->d_inode);
420 419
421 poll_wait(file, &channel_wqs[minor].rt_queue, wait); 420 poll_wait(file, &channel_wqs[minor].rt_queue, wait);
422 poll_wait(file, &channel_wqs[minor].lx_queue, wait); 421 poll_wait(file, &channel_wqs[minor].lx_queue, wait);
@@ -438,7 +437,7 @@ static unsigned int file_poll(struct file *file, poll_table * wait)
438static ssize_t file_read(struct file *file, char __user * buffer, size_t count, 437static ssize_t file_read(struct file *file, char __user * buffer, size_t count,
439 loff_t * ppos) 438 loff_t * ppos)
440{ 439{
441 int minor = MINOR(file->f_dentry->d_inode->i_rdev); 440 int minor = iminor(file->f_dentry->d_inode);
442 441
443 /* data available? */ 442 /* data available? */
444 if (!rtlx_read_poll(minor, (file->f_flags & O_NONBLOCK) ? 0 : 1)) { 443 if (!rtlx_read_poll(minor, (file->f_flags & O_NONBLOCK) ? 0 : 1)) {
@@ -455,7 +454,7 @@ static ssize_t file_write(struct file *file, const char __user * buffer,
455 struct rtlx_channel *rt; 454 struct rtlx_channel *rt;
456 DECLARE_WAITQUEUE(wait, current); 455 DECLARE_WAITQUEUE(wait, current);
457 456
458 minor = MINOR(file->f_dentry->d_inode->i_rdev); 457 minor = iminor(file->f_dentry->d_inode);
459 rt = &rtlx->channel[minor]; 458 rt = &rtlx->channel[minor];
460 459
461 /* any space left... */ 460 /* any space left... */