diff options
author | Josef Sipek <jsipek@fsl.cs.sunysb.edu> | 2006-12-08 02:36:55 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 08:28:44 -0800 |
commit | a7113a966241b700aecc7b8cb326cecb62e3c4b2 (patch) | |
tree | b28920a82e7cad67ea6e55826e161ba0e4cf9782 /drivers | |
parent | 6c648be6f4183775679c1f2cc4d094128f104fb2 (diff) | |
download | op-kernel-dev-a7113a966241b700aecc7b8cb326cecb62e3c4b2.zip op-kernel-dev-a7113a966241b700aecc7b8cb326cecb62e3c4b2.tar.gz |
[PATCH] struct path: convert char-drivers
Signed-off-by: Josef Sipek <jsipek@fsl.cs.sunysb.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/cs5535_gpio.c | 4 | ||||
-rw-r--r-- | drivers/char/dsp56k.c | 6 | ||||
-rw-r--r-- | drivers/char/dtlk.c | 4 | ||||
-rw-r--r-- | drivers/char/ip2/ip2main.c | 2 | ||||
-rw-r--r-- | drivers/char/istallion.c | 4 | ||||
-rw-r--r-- | drivers/char/lp.c | 4 | ||||
-rw-r--r-- | drivers/char/mem.c | 4 | ||||
-rw-r--r-- | drivers/char/nsc_gpio.c | 4 | ||||
-rw-r--r-- | drivers/char/ppdev.c | 4 | ||||
-rw-r--r-- | drivers/char/random.c | 2 | ||||
-rw-r--r-- | drivers/char/raw.c | 2 | ||||
-rw-r--r-- | drivers/char/sonypi.c | 2 | ||||
-rw-r--r-- | drivers/char/tb0219.c | 4 | ||||
-rw-r--r-- | drivers/char/tipar.c | 4 | ||||
-rw-r--r-- | drivers/char/tty_io.c | 12 | ||||
-rw-r--r-- | drivers/char/vc_screen.c | 6 | ||||
-rw-r--r-- | drivers/char/viotape.c | 10 | ||||
-rw-r--r-- | drivers/char/vr41xx_giu.c | 4 |
18 files changed, 41 insertions, 41 deletions
diff --git a/drivers/char/cs5535_gpio.c b/drivers/char/cs5535_gpio.c index 8ce3f34..c02d9e9 100644 --- a/drivers/char/cs5535_gpio.c +++ b/drivers/char/cs5535_gpio.c @@ -82,7 +82,7 @@ static inline u32 cs5535_lowhigh_base(int reg) static ssize_t cs5535_gpio_write(struct file *file, const char __user *data, size_t len, loff_t *ppos) { - u32 m = iminor(file->f_dentry->d_inode); + u32 m = iminor(file->f_path.dentry->d_inode); int i, j; u32 base = gpio_base + cs5535_lowhigh_base(m); u32 m0, m1; @@ -117,7 +117,7 @@ static ssize_t cs5535_gpio_write(struct file *file, const char __user *data, static ssize_t cs5535_gpio_read(struct file *file, char __user *buf, size_t len, loff_t *ppos) { - u32 m = iminor(file->f_dentry->d_inode); + u32 m = iminor(file->f_path.dentry->d_inode); u32 base = gpio_base + cs5535_lowhigh_base(m); int rd_bit = 1 << (m & 0x0f); int i; diff --git a/drivers/char/dsp56k.c b/drivers/char/dsp56k.c index 9b1bf60..06f2dbf 100644 --- a/drivers/char/dsp56k.c +++ b/drivers/char/dsp56k.c @@ -201,7 +201,7 @@ static int dsp56k_upload(u_char __user *bin, int len) static ssize_t dsp56k_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { - struct inode *inode = file->f_dentry->d_inode; + struct inode *inode = file->f_path.dentry->d_inode; int dev = iminor(inode) & 0x0f; switch(dev) @@ -264,7 +264,7 @@ static ssize_t dsp56k_read(struct file *file, char __user *buf, size_t count, static ssize_t dsp56k_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { - struct inode *inode = file->f_dentry->d_inode; + struct inode *inode = file->f_path.dentry->d_inode; int dev = iminor(inode) & 0x0f; switch(dev) @@ -420,7 +420,7 @@ static int dsp56k_ioctl(struct inode *inode, struct file *file, #if 0 static unsigned int dsp56k_poll(struct file *file, poll_table *wait) { - int dev = iminor(file->f_dentry->d_inode) & 0x0f; + int dev = iminor(file->f_path.dentry->d_inode) & 0x0f; switch(dev) { diff --git a/drivers/char/dtlk.c b/drivers/char/dtlk.c index 5e82c3b..d4005e9 100644 --- a/drivers/char/dtlk.c +++ b/drivers/char/dtlk.c @@ -122,7 +122,7 @@ static void dtlk_timer_tick(unsigned long data); static ssize_t dtlk_read(struct file *file, char __user *buf, size_t count, loff_t * ppos) { - unsigned int minor = iminor(file->f_dentry->d_inode); + unsigned int minor = iminor(file->f_path.dentry->d_inode); char ch; int i = 0, retries; @@ -174,7 +174,7 @@ static ssize_t dtlk_write(struct file *file, const char __user *buf, } #endif - if (iminor(file->f_dentry->d_inode) != DTLK_MINOR) + if (iminor(file->f_path.dentry->d_inode) != DTLK_MINOR) return -EINVAL; while (1) { diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c index cda2459..6810b7b 100644 --- a/drivers/char/ip2/ip2main.c +++ b/drivers/char/ip2/ip2main.c @@ -2700,7 +2700,7 @@ static ssize_t ip2_ipl_read(struct file *pFile, char __user *pData, size_t count, loff_t *off ) { - unsigned int minor = iminor(pFile->f_dentry->d_inode); + unsigned int minor = iminor(pFile->f_path.dentry->d_inode); int rc = 0; #ifdef IP2DEBUG_IPL diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c index 8f59194..b6f0d03 100644 --- a/drivers/char/istallion.c +++ b/drivers/char/istallion.c @@ -4194,7 +4194,7 @@ static ssize_t stli_memread(struct file *fp, char __user *buf, size_t count, lof void *p; loff_t off = *offp; - brdnr = iminor(fp->f_dentry->d_inode); + brdnr = iminor(fp->f_path.dentry->d_inode); if (brdnr >= stli_nrbrds) return -ENODEV; brdp = stli_brds[brdnr]; @@ -4258,7 +4258,7 @@ static ssize_t stli_memwrite(struct file *fp, const char __user *buf, size_t cou void *p; loff_t off = *offp; - brdnr = iminor(fp->f_dentry->d_inode); + brdnr = iminor(fp->f_path.dentry->d_inode); if (brdnr >= stli_nrbrds) return -ENODEV; diff --git a/drivers/char/lp.c b/drivers/char/lp.c index 1ecea7d..b70b538 100644 --- a/drivers/char/lp.c +++ b/drivers/char/lp.c @@ -296,7 +296,7 @@ static int lp_wait_ready(int minor, int nonblock) static ssize_t lp_write(struct file * file, const char __user * buf, size_t count, loff_t *ppos) { - unsigned int minor = iminor(file->f_dentry->d_inode); + unsigned int minor = iminor(file->f_path.dentry->d_inode); struct parport *port = lp_table[minor].dev->port; char *kbuf = lp_table[minor].lp_buffer; ssize_t retv = 0; @@ -415,7 +415,7 @@ static ssize_t lp_read(struct file * file, char __user * buf, size_t count, loff_t *ppos) { DEFINE_WAIT(wait); - unsigned int minor=iminor(file->f_dentry->d_inode); + unsigned int minor=iminor(file->f_path.dentry->d_inode); struct parport *port = lp_table[minor].dev->port; ssize_t retval = 0; char *kbuf = lp_table[minor].lp_buffer; diff --git a/drivers/char/mem.c b/drivers/char/mem.c index e67eef4..089020e 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c @@ -774,7 +774,7 @@ static loff_t memory_lseek(struct file * file, loff_t offset, int orig) { loff_t ret; - mutex_lock(&file->f_dentry->d_inode->i_mutex); + mutex_lock(&file->f_path.dentry->d_inode->i_mutex); switch (orig) { case 0: file->f_pos = offset; @@ -789,7 +789,7 @@ static loff_t memory_lseek(struct file * file, loff_t offset, int orig) default: ret = -EINVAL; } - mutex_unlock(&file->f_dentry->d_inode->i_mutex); + mutex_unlock(&file->f_path.dentry->d_inode->i_mutex); return ret; } diff --git a/drivers/char/nsc_gpio.c b/drivers/char/nsc_gpio.c index 4d47d79..808d44e 100644 --- a/drivers/char/nsc_gpio.c +++ b/drivers/char/nsc_gpio.c @@ -41,7 +41,7 @@ void nsc_gpio_dump(struct nsc_gpio_ops *amp, unsigned index) ssize_t nsc_gpio_write(struct file *file, const char __user *data, size_t len, loff_t *ppos) { - unsigned m = iminor(file->f_dentry->d_inode); + unsigned m = iminor(file->f_path.dentry->d_inode); struct nsc_gpio_ops *amp = file->private_data; struct device *dev = amp->dev; size_t i; @@ -104,7 +104,7 @@ ssize_t nsc_gpio_write(struct file *file, const char __user *data, ssize_t nsc_gpio_read(struct file *file, char __user * buf, size_t len, loff_t * ppos) { - unsigned m = iminor(file->f_dentry->d_inode); + unsigned m = iminor(file->f_path.dentry->d_inode); int value; struct nsc_gpio_ops *amp = file->private_data; diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c index c1e3dd8..4abd1ef 100644 --- a/drivers/char/ppdev.c +++ b/drivers/char/ppdev.c @@ -106,7 +106,7 @@ static inline void pp_enable_irq (struct pp_struct *pp) static ssize_t pp_read (struct file * file, char __user * buf, size_t count, loff_t * ppos) { - unsigned int minor = iminor(file->f_dentry->d_inode); + unsigned int minor = iminor(file->f_path.dentry->d_inode); struct pp_struct *pp = file->private_data; char * kbuffer; ssize_t bytes_read = 0; @@ -189,7 +189,7 @@ static ssize_t pp_read (struct file * file, char __user * buf, size_t count, static ssize_t pp_write (struct file * file, const char __user * buf, size_t count, loff_t * ppos) { - unsigned int minor = iminor(file->f_dentry->d_inode); + unsigned int minor = iminor(file->f_path.dentry->d_inode); struct pp_struct *pp = file->private_data; char * kbuffer; ssize_t bytes_written = 0; diff --git a/drivers/char/random.c b/drivers/char/random.c index 4c6782a..092a01c 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -1048,7 +1048,7 @@ random_write(struct file * file, const char __user * buffer, if (p == buffer) { return (ssize_t)ret; } else { - struct inode *inode = file->f_dentry->d_inode; + struct inode *inode = file->f_path.dentry->d_inode; inode->i_mtime = current_fs_time(inode->i_sb); mark_inode_dirty(inode); return (ssize_t)(p - buffer); diff --git a/drivers/char/raw.c b/drivers/char/raw.c index 3b32313..645e20a 100644 --- a/drivers/char/raw.c +++ b/drivers/char/raw.c @@ -75,7 +75,7 @@ static int raw_open(struct inode *inode, struct file *filp) filp->f_flags |= O_DIRECT; filp->f_mapping = bdev->bd_inode->i_mapping; if (++raw_devices[minor].inuse == 1) - filp->f_dentry->d_inode->i_mapping = + filp->f_path.dentry->d_inode->i_mapping = bdev->bd_inode->i_mapping; filp->private_data = bdev; mutex_unlock(&raw_mutex); diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index fc87070..17d54e1 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c @@ -979,7 +979,7 @@ static ssize_t sonypi_misc_read(struct file *file, char __user *buf, } if (ret > 0) { - struct inode *inode = file->f_dentry->d_inode; + struct inode *inode = file->f_path.dentry->d_inode; inode->i_atime = current_fs_time(inode->i_sb); } diff --git a/drivers/char/tb0219.c b/drivers/char/tb0219.c index bb1bad4..4c431cb 100644 --- a/drivers/char/tb0219.c +++ b/drivers/char/tb0219.c @@ -164,7 +164,7 @@ static ssize_t tanbac_tb0219_read(struct file *file, char __user *buf, size_t le unsigned int minor; char value; - minor = iminor(file->f_dentry->d_inode); + minor = iminor(file->f_path.dentry->d_inode); switch (minor) { case 0: value = get_led(); @@ -200,7 +200,7 @@ static ssize_t tanbac_tb0219_write(struct file *file, const char __user *data, int retval = 0; char c; - minor = iminor(file->f_dentry->d_inode); + minor = iminor(file->f_path.dentry->d_inode); switch (minor) { case 0: type = TYPE_LED; diff --git a/drivers/char/tipar.c b/drivers/char/tipar.c index 9df0ca1..47fb20f 100644 --- a/drivers/char/tipar.c +++ b/drivers/char/tipar.c @@ -285,7 +285,7 @@ static ssize_t tipar_write (struct file *file, const char __user *buf, size_t count, loff_t * ppos) { - unsigned int minor = iminor(file->f_dentry->d_inode) - TIPAR_MINOR; + unsigned int minor = iminor(file->f_path.dentry->d_inode) - TIPAR_MINOR; ssize_t n; parport_claim_or_block(table[minor].dev); @@ -313,7 +313,7 @@ static ssize_t tipar_read(struct file *file, char __user *buf, size_t count, loff_t * ppos) { int b = 0; - unsigned int minor = iminor(file->f_dentry->d_inode) - TIPAR_MINOR; + unsigned int minor = iminor(file->f_path.dentry->d_inode) - TIPAR_MINOR; ssize_t retval = 0; ssize_t n = 0; diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 0c856a6..8a2d26e 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -1629,7 +1629,7 @@ static ssize_t tty_read(struct file * file, char __user * buf, size_t count, struct tty_ldisc *ld; tty = (struct tty_struct *)file->private_data; - inode = file->f_dentry->d_inode; + inode = file->f_path.dentry->d_inode; if (tty_paranoia_check(tty, inode, "tty_read")) return -EIO; if (!tty || (test_bit(TTY_IO_ERROR, &tty->flags))) @@ -1732,7 +1732,7 @@ static inline ssize_t do_tty_write( cond_resched(); } if (written) { - struct inode *inode = file->f_dentry->d_inode; + struct inode *inode = file->f_path.dentry->d_inode; inode->i_mtime = current_fs_time(inode->i_sb); ret = written; } @@ -1763,7 +1763,7 @@ static ssize_t tty_write(struct file * file, const char __user * buf, size_t cou loff_t *ppos) { struct tty_struct * tty; - struct inode *inode = file->f_dentry->d_inode; + struct inode *inode = file->f_path.dentry->d_inode; ssize_t ret; struct tty_ldisc *ld; @@ -2170,7 +2170,7 @@ static void release_dev(struct file * filp) unsigned long flags; tty = (struct tty_struct *)filp->private_data; - if (tty_paranoia_check(tty, filp->f_dentry->d_inode, "release_dev")) + if (tty_paranoia_check(tty, filp->f_path.dentry->d_inode, "release_dev")) return; check_tty_count(tty, "release_dev"); @@ -2680,7 +2680,7 @@ static unsigned int tty_poll(struct file * filp, poll_table * wait) int ret = 0; tty = (struct tty_struct *)filp->private_data; - if (tty_paranoia_check(tty, filp->f_dentry->d_inode, "tty_poll")) + if (tty_paranoia_check(tty, filp->f_path.dentry->d_inode, "tty_poll")) return 0; ld = tty_ldisc_ref_wait(tty); @@ -2696,7 +2696,7 @@ static int tty_fasync(int fd, struct file * filp, int on) int retval; tty = (struct tty_struct *)filp->private_data; - if (tty_paranoia_check(tty, filp->f_dentry->d_inode, "tty_fasync")) + if (tty_paranoia_check(tty, filp->f_path.dentry->d_inode, "tty_fasync")) return 0; retval = fasync_helper(fd, filp, on, &tty->fasync); diff --git a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c index f442b57..2677651 100644 --- a/drivers/char/vc_screen.c +++ b/drivers/char/vc_screen.c @@ -72,7 +72,7 @@ static loff_t vcs_lseek(struct file *file, loff_t offset, int orig) int size; down(&con_buf_sem); - size = vcs_size(file->f_dentry->d_inode); + size = vcs_size(file->f_path.dentry->d_inode); switch (orig) { default: up(&con_buf_sem); @@ -98,7 +98,7 @@ static loff_t vcs_lseek(struct file *file, loff_t offset, int orig) static ssize_t vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { - struct inode *inode = file->f_dentry->d_inode; + struct inode *inode = file->f_path.dentry->d_inode; unsigned int currcons = iminor(inode); struct vc_data *vc; long pos; @@ -271,7 +271,7 @@ unlock_out: static ssize_t vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { - struct inode *inode = file->f_dentry->d_inode; + struct inode *inode = file->f_path.dentry->d_inode; unsigned int currcons = iminor(inode); struct vc_data *vc; long pos; diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c index 73c78bf..94d79cb 100644 --- a/drivers/char/viotape.c +++ b/drivers/char/viotape.c @@ -442,7 +442,7 @@ static ssize_t viotap_write(struct file *file, const char *buf, if (op == NULL) return -ENOMEM; - get_dev_info(file->f_dentry->d_inode, &devi); + get_dev_info(file->f_path.dentry->d_inode, &devi); /* * We need to make sure we can send a request. We use @@ -532,7 +532,7 @@ static ssize_t viotap_read(struct file *file, char *buf, size_t count, if (op == NULL) return -ENOMEM; - get_dev_info(file->f_dentry->d_inode, &devi); + get_dev_info(file->f_path.dentry->d_inode, &devi); /* * We need to make sure we can send a request. We use @@ -612,7 +612,7 @@ static int viotap_ioctl(struct inode *inode, struct file *file, if (op == NULL) return -ENOMEM; - get_dev_info(file->f_dentry->d_inode, &devi); + get_dev_info(file->f_path.dentry->d_inode, &devi); down(&reqSem); @@ -777,7 +777,7 @@ static int viotap_open(struct inode *inode, struct file *file) if (op == NULL) return -ENOMEM; - get_dev_info(file->f_dentry->d_inode, &devi); + get_dev_info(file->f_path.dentry->d_inode, &devi); /* Note: We currently only support one mode! */ if ((devi.devno >= viotape_numdev) || (devi.mode)) { @@ -822,7 +822,7 @@ static int viotap_release(struct inode *inode, struct file *file) return -ENOMEM; init_completion(&op->com); - get_dev_info(file->f_dentry->d_inode, &devi); + get_dev_info(file->f_path.dentry->d_inode, &devi); if (devi.devno >= viotape_numdev) { ret = -ENODEV; diff --git a/drivers/char/vr41xx_giu.c b/drivers/char/vr41xx_giu.c index 8e79493..a744dad 100644 --- a/drivers/char/vr41xx_giu.c +++ b/drivers/char/vr41xx_giu.c @@ -506,7 +506,7 @@ static ssize_t gpio_read(struct file *file, char __user *buf, size_t len, unsigned int pin; char value = '0'; - pin = iminor(file->f_dentry->d_inode); + pin = iminor(file->f_path.dentry->d_inode); if (pin >= giu_nr_pins) return -EBADF; @@ -530,7 +530,7 @@ static ssize_t gpio_write(struct file *file, const char __user *data, char c; int retval = 0; - pin = iminor(file->f_dentry->d_inode); + pin = iminor(file->f_path.dentry->d_inode); if (pin >= giu_nr_pins) return -EBADF; |