Commit cd6b3956 authored by Eric Sesterhenn's avatar Eric Sesterhenn Committed by Linus Torvalds

[PATCH] isdn: cleanup i_rdev udage

Signed-off-by: default avatarEric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 2c16e9c8
...@@ -1059,7 +1059,7 @@ isdn_info_update(void) ...@@ -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) ...@@ -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 ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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) {
......
...@@ -667,7 +667,7 @@ isdn_ppp_poll(struct file *file, poll_table * wait) ...@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment