X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fisdn%2Fhysdn%2Fhysdn_procconf.c;h=5da507e532fc5ef9bbac164516f89d8f081e4d8e;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=2a312dee7743fdbc1e73e370a3e50a5af31aa024;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/drivers/isdn/hysdn/hysdn_procconf.c b/drivers/isdn/hysdn/hysdn_procconf.c index 2a312dee7..5da507e53 100644 --- a/drivers/isdn/hysdn/hysdn_procconf.c +++ b/drivers/isdn/hysdn/hysdn_procconf.c @@ -89,14 +89,12 @@ process_line(struct conf_writedata *cnf) /* write conf file -> boot or send cfg line to card */ /****************************************************/ static ssize_t -hysdn_conf_write(struct file *file, const char *buf, size_t count, loff_t * off) +hysdn_conf_write(struct file *file, const char __user *buf, size_t count, loff_t * off) { struct conf_writedata *cnf; int i; uchar ch, *cp; - if (&file->f_pos != off) /* fs error check */ - return (-ESPIPE); if (!count) return (0); /* nothing to handle */ @@ -209,14 +207,11 @@ hysdn_conf_write(struct file *file, const char *buf, size_t count, loff_t * off) /* read conf file -> output card info data */ /*******************************************/ static ssize_t -hysdn_conf_read(struct file *file, char *buf, size_t count, loff_t * off) +hysdn_conf_read(struct file *file, char __user *buf, size_t count, loff_t * off) { char *cp; int i; - if (off != &file->f_pos) /* fs error check */ - return -ESPIPE; - if (file->f_mode & FMODE_READ) { if (!(cp = file->private_data)) return (-EFAULT); /* should never happen */ @@ -320,7 +315,7 @@ hysdn_conf_open(struct inode *ino, struct file *filep) return (-EPERM); /* no permission this time */ } unlock_kernel(); - return (0); + return nonseekable_open(ino, filep); } /* hysdn_conf_open */ /***************************/