Commit a7113a96 authored by Josef Sipek's avatar Josef Sipek Committed by Linus Torvalds

[PATCH] struct path: convert char-drivers

Signed-off-by: default avatarJosef Sipek <jsipek@fsl.cs.sunysb.edu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6c648be6
...@@ -82,7 +82,7 @@ static inline u32 cs5535_lowhigh_base(int reg) ...@@ -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, static ssize_t cs5535_gpio_write(struct file *file, const char __user *data,
size_t len, loff_t *ppos) 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; int i, j;
u32 base = gpio_base + cs5535_lowhigh_base(m); u32 base = gpio_base + cs5535_lowhigh_base(m);
u32 m0, m1; u32 m0, m1;
...@@ -117,7 +117,7 @@ static ssize_t cs5535_gpio_write(struct file *file, const char __user *data, ...@@ -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, static ssize_t cs5535_gpio_read(struct file *file, char __user *buf,
size_t len, loff_t *ppos) 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); u32 base = gpio_base + cs5535_lowhigh_base(m);
int rd_bit = 1 << (m & 0x0f); int rd_bit = 1 << (m & 0x0f);
int i; int i;
......
...@@ -201,7 +201,7 @@ static int dsp56k_upload(u_char __user *bin, int len) ...@@ -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, static ssize_t dsp56k_read(struct file *file, char __user *buf, size_t count,
loff_t *ppos) 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; int dev = iminor(inode) & 0x0f;
switch(dev) switch(dev)
...@@ -264,7 +264,7 @@ static ssize_t dsp56k_read(struct file *file, char __user *buf, size_t count, ...@@ -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, static ssize_t dsp56k_write(struct file *file, const char __user *buf, size_t count,
loff_t *ppos) 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; int dev = iminor(inode) & 0x0f;
switch(dev) switch(dev)
...@@ -420,7 +420,7 @@ static int dsp56k_ioctl(struct inode *inode, struct file *file, ...@@ -420,7 +420,7 @@ static int dsp56k_ioctl(struct inode *inode, struct file *file,
#if 0 #if 0
static unsigned int dsp56k_poll(struct file *file, poll_table *wait) 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) switch(dev)
{ {
......
...@@ -122,7 +122,7 @@ static void dtlk_timer_tick(unsigned long data); ...@@ -122,7 +122,7 @@ static void dtlk_timer_tick(unsigned long data);
static ssize_t dtlk_read(struct file *file, char __user *buf, static ssize_t dtlk_read(struct file *file, char __user *buf,
size_t count, loff_t * ppos) 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; char ch;
int i = 0, retries; int i = 0, retries;
...@@ -174,7 +174,7 @@ static ssize_t dtlk_write(struct file *file, const char __user *buf, ...@@ -174,7 +174,7 @@ static ssize_t dtlk_write(struct file *file, const char __user *buf,
} }
#endif #endif
if (iminor(file->f_dentry->d_inode) != DTLK_MINOR) if (iminor(file->f_path.dentry->d_inode) != DTLK_MINOR)
return -EINVAL; return -EINVAL;
while (1) { while (1) {
......
...@@ -2700,7 +2700,7 @@ static ...@@ -2700,7 +2700,7 @@ static
ssize_t ssize_t
ip2_ipl_read(struct file *pFile, char __user *pData, size_t count, loff_t *off ) 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; int rc = 0;
#ifdef IP2DEBUG_IPL #ifdef IP2DEBUG_IPL
......
...@@ -4194,7 +4194,7 @@ static ssize_t stli_memread(struct file *fp, char __user *buf, size_t count, lof ...@@ -4194,7 +4194,7 @@ static ssize_t stli_memread(struct file *fp, char __user *buf, size_t count, lof
void *p; void *p;
loff_t off = *offp; loff_t off = *offp;
brdnr = iminor(fp->f_dentry->d_inode); brdnr = iminor(fp->f_path.dentry->d_inode);
if (brdnr >= stli_nrbrds) if (brdnr >= stli_nrbrds)
return -ENODEV; return -ENODEV;
brdp = stli_brds[brdnr]; brdp = stli_brds[brdnr];
...@@ -4258,7 +4258,7 @@ static ssize_t stli_memwrite(struct file *fp, const char __user *buf, size_t cou ...@@ -4258,7 +4258,7 @@ static ssize_t stli_memwrite(struct file *fp, const char __user *buf, size_t cou
void *p; void *p;
loff_t off = *offp; loff_t off = *offp;
brdnr = iminor(fp->f_dentry->d_inode); brdnr = iminor(fp->f_path.dentry->d_inode);
if (brdnr >= stli_nrbrds) if (brdnr >= stli_nrbrds)
return -ENODEV; return -ENODEV;
......
...@@ -296,7 +296,7 @@ static int lp_wait_ready(int minor, int nonblock) ...@@ -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, static ssize_t lp_write(struct file * file, const char __user * buf,
size_t count, loff_t *ppos) 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; struct parport *port = lp_table[minor].dev->port;
char *kbuf = lp_table[minor].lp_buffer; char *kbuf = lp_table[minor].lp_buffer;
ssize_t retv = 0; ssize_t retv = 0;
...@@ -415,7 +415,7 @@ static ssize_t lp_read(struct file * file, char __user * buf, ...@@ -415,7 +415,7 @@ static ssize_t lp_read(struct file * file, char __user * buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
DEFINE_WAIT(wait); 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; struct parport *port = lp_table[minor].dev->port;
ssize_t retval = 0; ssize_t retval = 0;
char *kbuf = lp_table[minor].lp_buffer; char *kbuf = lp_table[minor].lp_buffer;
......
...@@ -774,7 +774,7 @@ static loff_t memory_lseek(struct file * file, loff_t offset, int orig) ...@@ -774,7 +774,7 @@ static loff_t memory_lseek(struct file * file, loff_t offset, int orig)
{ {
loff_t ret; loff_t ret;
mutex_lock(&file->f_dentry->d_inode->i_mutex); mutex_lock(&file->f_path.dentry->d_inode->i_mutex);
switch (orig) { switch (orig) {
case 0: case 0:
file->f_pos = offset; file->f_pos = offset;
...@@ -789,7 +789,7 @@ static loff_t memory_lseek(struct file * file, loff_t offset, int orig) ...@@ -789,7 +789,7 @@ static loff_t memory_lseek(struct file * file, loff_t offset, int orig)
default: default:
ret = -EINVAL; ret = -EINVAL;
} }
mutex_unlock(&file->f_dentry->d_inode->i_mutex); mutex_unlock(&file->f_path.dentry->d_inode->i_mutex);
return ret; return ret;
} }
......
...@@ -41,7 +41,7 @@ void nsc_gpio_dump(struct nsc_gpio_ops *amp, unsigned index) ...@@ -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, ssize_t nsc_gpio_write(struct file *file, const char __user *data,
size_t len, loff_t *ppos) 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 nsc_gpio_ops *amp = file->private_data;
struct device *dev = amp->dev; struct device *dev = amp->dev;
size_t i; size_t i;
...@@ -104,7 +104,7 @@ ssize_t nsc_gpio_write(struct file *file, const char __user *data, ...@@ -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, ssize_t nsc_gpio_read(struct file *file, char __user * buf,
size_t len, loff_t * ppos) 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; int value;
struct nsc_gpio_ops *amp = file->private_data; struct nsc_gpio_ops *amp = file->private_data;
......
...@@ -106,7 +106,7 @@ static inline void pp_enable_irq (struct pp_struct *pp) ...@@ -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, static ssize_t pp_read (struct file * file, char __user * buf, size_t count,
loff_t * ppos) 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; struct pp_struct *pp = file->private_data;
char * kbuffer; char * kbuffer;
ssize_t bytes_read = 0; ssize_t bytes_read = 0;
...@@ -189,7 +189,7 @@ static ssize_t pp_read (struct file * file, char __user * buf, size_t count, ...@@ -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, static ssize_t pp_write (struct file * file, const char __user * buf,
size_t count, loff_t * ppos) 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; struct pp_struct *pp = file->private_data;
char * kbuffer; char * kbuffer;
ssize_t bytes_written = 0; ssize_t bytes_written = 0;
......
...@@ -1048,7 +1048,7 @@ random_write(struct file * file, const char __user * buffer, ...@@ -1048,7 +1048,7 @@ random_write(struct file * file, const char __user * buffer,
if (p == buffer) { if (p == buffer) {
return (ssize_t)ret; return (ssize_t)ret;
} else { } 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); inode->i_mtime = current_fs_time(inode->i_sb);
mark_inode_dirty(inode); mark_inode_dirty(inode);
return (ssize_t)(p - buffer); return (ssize_t)(p - buffer);
......
...@@ -75,7 +75,7 @@ static int raw_open(struct inode *inode, struct file *filp) ...@@ -75,7 +75,7 @@ static int raw_open(struct inode *inode, struct file *filp)
filp->f_flags |= O_DIRECT; filp->f_flags |= O_DIRECT;
filp->f_mapping = bdev->bd_inode->i_mapping; filp->f_mapping = bdev->bd_inode->i_mapping;
if (++raw_devices[minor].inuse == 1) 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; bdev->bd_inode->i_mapping;
filp->private_data = bdev; filp->private_data = bdev;
mutex_unlock(&raw_mutex); mutex_unlock(&raw_mutex);
......
...@@ -979,7 +979,7 @@ static ssize_t sonypi_misc_read(struct file *file, char __user *buf, ...@@ -979,7 +979,7 @@ static ssize_t sonypi_misc_read(struct file *file, char __user *buf,
} }
if (ret > 0) { 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); inode->i_atime = current_fs_time(inode->i_sb);
} }
......
...@@ -164,7 +164,7 @@ static ssize_t tanbac_tb0219_read(struct file *file, char __user *buf, size_t le ...@@ -164,7 +164,7 @@ static ssize_t tanbac_tb0219_read(struct file *file, char __user *buf, size_t le
unsigned int minor; unsigned int minor;
char value; char value;
minor = iminor(file->f_dentry->d_inode); minor = iminor(file->f_path.dentry->d_inode);
switch (minor) { switch (minor) {
case 0: case 0:
value = get_led(); value = get_led();
...@@ -200,7 +200,7 @@ static ssize_t tanbac_tb0219_write(struct file *file, const char __user *data, ...@@ -200,7 +200,7 @@ static ssize_t tanbac_tb0219_write(struct file *file, const char __user *data,
int retval = 0; int retval = 0;
char c; char c;
minor = iminor(file->f_dentry->d_inode); minor = iminor(file->f_path.dentry->d_inode);
switch (minor) { switch (minor) {
case 0: case 0:
type = TYPE_LED; type = TYPE_LED;
......
...@@ -285,7 +285,7 @@ static ssize_t ...@@ -285,7 +285,7 @@ static ssize_t
tipar_write (struct file *file, const char __user *buf, size_t count, tipar_write (struct file *file, const char __user *buf, size_t count,
loff_t * ppos) 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; ssize_t n;
parport_claim_or_block(table[minor].dev); parport_claim_or_block(table[minor].dev);
...@@ -313,7 +313,7 @@ static ssize_t ...@@ -313,7 +313,7 @@ static ssize_t
tipar_read(struct file *file, char __user *buf, size_t count, loff_t * ppos) tipar_read(struct file *file, char __user *buf, size_t count, loff_t * ppos)
{ {
int b = 0; 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 retval = 0;
ssize_t n = 0; ssize_t n = 0;
......
...@@ -1629,7 +1629,7 @@ static ssize_t tty_read(struct file * file, char __user * buf, size_t count, ...@@ -1629,7 +1629,7 @@ static ssize_t tty_read(struct file * file, char __user * buf, size_t count,
struct tty_ldisc *ld; struct tty_ldisc *ld;
tty = (struct tty_struct *)file->private_data; 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")) if (tty_paranoia_check(tty, inode, "tty_read"))
return -EIO; return -EIO;
if (!tty || (test_bit(TTY_IO_ERROR, &tty->flags))) if (!tty || (test_bit(TTY_IO_ERROR, &tty->flags)))
...@@ -1732,7 +1732,7 @@ static inline ssize_t do_tty_write( ...@@ -1732,7 +1732,7 @@ static inline ssize_t do_tty_write(
cond_resched(); cond_resched();
} }
if (written) { 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); inode->i_mtime = current_fs_time(inode->i_sb);
ret = written; ret = written;
} }
...@@ -1763,7 +1763,7 @@ static ssize_t tty_write(struct file * file, const char __user * buf, size_t cou ...@@ -1763,7 +1763,7 @@ static ssize_t tty_write(struct file * file, const char __user * buf, size_t cou
loff_t *ppos) loff_t *ppos)
{ {
struct tty_struct * tty; struct tty_struct * tty;
struct inode *inode = file->f_dentry->d_inode; struct inode *inode = file->f_path.dentry->d_inode;
ssize_t ret; ssize_t ret;
struct tty_ldisc *ld; struct tty_ldisc *ld;
...@@ -2170,7 +2170,7 @@ static void release_dev(struct file * filp) ...@@ -2170,7 +2170,7 @@ static void release_dev(struct file * filp)
unsigned long flags; unsigned long flags;
tty = (struct tty_struct *)filp->private_data; 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; return;
check_tty_count(tty, "release_dev"); check_tty_count(tty, "release_dev");
...@@ -2680,7 +2680,7 @@ static unsigned int tty_poll(struct file * filp, poll_table * wait) ...@@ -2680,7 +2680,7 @@ static unsigned int tty_poll(struct file * filp, poll_table * wait)
int ret = 0; int ret = 0;
tty = (struct tty_struct *)filp->private_data; 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; return 0;
ld = tty_ldisc_ref_wait(tty); ld = tty_ldisc_ref_wait(tty);
...@@ -2696,7 +2696,7 @@ static int tty_fasync(int fd, struct file * filp, int on) ...@@ -2696,7 +2696,7 @@ static int tty_fasync(int fd, struct file * filp, int on)
int retval; int retval;
tty = (struct tty_struct *)filp->private_data; 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; return 0;
retval = fasync_helper(fd, filp, on, &tty->fasync); retval = fasync_helper(fd, filp, on, &tty->fasync);
......
...@@ -72,7 +72,7 @@ static loff_t vcs_lseek(struct file *file, loff_t offset, int orig) ...@@ -72,7 +72,7 @@ static loff_t vcs_lseek(struct file *file, loff_t offset, int orig)
int size; int size;
down(&con_buf_sem); down(&con_buf_sem);
size = vcs_size(file->f_dentry->d_inode); size = vcs_size(file->f_path.dentry->d_inode);
switch (orig) { switch (orig) {
default: default:
up(&con_buf_sem); up(&con_buf_sem);
...@@ -98,7 +98,7 @@ static loff_t vcs_lseek(struct file *file, loff_t offset, int orig) ...@@ -98,7 +98,7 @@ static loff_t vcs_lseek(struct file *file, loff_t offset, int orig)
static ssize_t static ssize_t
vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) 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); unsigned int currcons = iminor(inode);
struct vc_data *vc; struct vc_data *vc;
long pos; long pos;
...@@ -271,7 +271,7 @@ vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) ...@@ -271,7 +271,7 @@ vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
static ssize_t static ssize_t
vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) 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); unsigned int currcons = iminor(inode);
struct vc_data *vc; struct vc_data *vc;
long pos; long pos;
......
...@@ -442,7 +442,7 @@ static ssize_t viotap_write(struct file *file, const char *buf, ...@@ -442,7 +442,7 @@ static ssize_t viotap_write(struct file *file, const char *buf,
if (op == NULL) if (op == NULL)
return -ENOMEM; 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 * 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, ...@@ -532,7 +532,7 @@ static ssize_t viotap_read(struct file *file, char *buf, size_t count,
if (op == NULL) if (op == NULL)
return -ENOMEM; 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 * 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, ...@@ -612,7 +612,7 @@ static int viotap_ioctl(struct inode *inode, struct file *file,
if (op == NULL) if (op == NULL)
return -ENOMEM; return -ENOMEM;
get_dev_info(file->f_dentry->d_inode, &devi); get_dev_info(file->f_path.dentry->d_inode, &devi);
down(&reqSem); down(&reqSem);
...@@ -777,7 +777,7 @@ static int viotap_open(struct inode *inode, struct file *file) ...@@ -777,7 +777,7 @@ static int viotap_open(struct inode *inode, struct file *file)
if (op == NULL) if (op == NULL)
return -ENOMEM; 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! */ /* Note: We currently only support one mode! */
if ((devi.devno >= viotape_numdev) || (devi.mode)) { if ((devi.devno >= viotape_numdev) || (devi.mode)) {
...@@ -822,7 +822,7 @@ static int viotap_release(struct inode *inode, struct file *file) ...@@ -822,7 +822,7 @@ static int viotap_release(struct inode *inode, struct file *file)
return -ENOMEM; return -ENOMEM;
init_completion(&op->com); 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) { if (devi.devno >= viotape_numdev) {
ret = -ENODEV; ret = -ENODEV;
......
...@@ -506,7 +506,7 @@ static ssize_t gpio_read(struct file *file, char __user *buf, size_t len, ...@@ -506,7 +506,7 @@ static ssize_t gpio_read(struct file *file, char __user *buf, size_t len,
unsigned int pin; unsigned int pin;
char value = '0'; char value = '0';
pin = iminor(file->f_dentry->d_inode); pin = iminor(file->f_path.dentry->d_inode);
if (pin >= giu_nr_pins) if (pin >= giu_nr_pins)
return -EBADF; return -EBADF;
...@@ -530,7 +530,7 @@ static ssize_t gpio_write(struct file *file, const char __user *data, ...@@ -530,7 +530,7 @@ static ssize_t gpio_write(struct file *file, const char __user *data,
char c; char c;
int retval = 0; int retval = 0;
pin = iminor(file->f_dentry->d_inode); pin = iminor(file->f_path.dentry->d_inode);
if (pin >= giu_nr_pins) if (pin >= giu_nr_pins)
return -EBADF; return -EBADF;
......
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