[PATCH] isdn: cleanup i_rdev udage

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Eric Sesterhenn 2006-07-10 04:45:43 -07:00 committed by Linus Torvalds
parent 2c16e9c888
commit cd6b3956e9
2 changed files with 7 additions and 7 deletions

View File

@ -1059,7 +1059,7 @@ isdn_info_update(void)
static ssize_t static ssize_t
isdn_read(struct file *file, char __user *buf, size_t count, loff_t * off) isdn_read(struct file *file, char __user *buf, size_t count, loff_t * off)
{ {
uint minor = MINOR(file->f_dentry->d_inode->i_rdev); uint minor = iminor(file->f_dentry->d_inode);
int len = 0; int len = 0;
int drvidx; int drvidx;
int chidx; int chidx;
@ -1163,7 +1163,7 @@ isdn_read(struct file *file, char __user *buf, size_t count, loff_t * off)
static ssize_t static ssize_t
isdn_write(struct file *file, const char __user *buf, size_t count, loff_t * off) isdn_write(struct file *file, const char __user *buf, size_t count, loff_t * off)
{ {
uint minor = MINOR(file->f_dentry->d_inode->i_rdev); uint minor = iminor(file->f_dentry->d_inode);
int drvidx; int drvidx;
int chidx; int chidx;
int retval; int retval;
@ -1225,7 +1225,7 @@ static unsigned int
isdn_poll(struct file *file, poll_table * wait) isdn_poll(struct file *file, poll_table * wait)
{ {
unsigned int mask = 0; unsigned int mask = 0;
unsigned int minor = MINOR(file->f_dentry->d_inode->i_rdev); unsigned int minor = iminor(file->f_dentry->d_inode);
int drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL); int drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL);
lock_kernel(); lock_kernel();
@ -1266,7 +1266,7 @@ isdn_poll(struct file *file, poll_table * wait)
static int static int
isdn_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg) isdn_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg)
{ {
uint minor = MINOR(inode->i_rdev); uint minor = iminor(inode);
isdn_ctrl c; isdn_ctrl c;
int drvidx; int drvidx;
int chidx; int chidx;
@ -1717,7 +1717,7 @@ isdn_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg)
static int static int
isdn_open(struct inode *ino, struct file *filep) isdn_open(struct inode *ino, struct file *filep)
{ {
uint minor = MINOR(ino->i_rdev); uint minor = iminor(ino);
int drvidx; int drvidx;
int chidx; int chidx;
int retval = -ENODEV; int retval = -ENODEV;
@ -1779,7 +1779,7 @@ isdn_open(struct inode *ino, struct file *filep)
static int static int
isdn_close(struct inode *ino, struct file *filep) isdn_close(struct inode *ino, struct file *filep)
{ {
uint minor = MINOR(ino->i_rdev); uint minor = iminor(ino);
lock_kernel(); lock_kernel();
if (minor == ISDN_MINOR_STATUS) { if (minor == ISDN_MINOR_STATUS) {

View File

@ -667,7 +667,7 @@ isdn_ppp_poll(struct file *file, poll_table * wait)
if (is->debug & 0x2) if (is->debug & 0x2)
printk(KERN_DEBUG "isdn_ppp_poll: minor: %d\n", printk(KERN_DEBUG "isdn_ppp_poll: minor: %d\n",
MINOR(file->f_dentry->d_inode->i_rdev)); iminor(file->f_dentry->d_inode));
/* just registers wait_queue hook. This doesn't really wait. */ /* just registers wait_queue hook. This doesn't really wait. */
poll_wait(file, &is->wq, wait); poll_wait(file, &is->wq, wait);