patch-2.1.62 linux/drivers/isdn/isdn_common.c

Next file: linux/drivers/net/3c501.c
Previous file: linux/drivers/isdn/hisax/teles3.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.61/linux/drivers/isdn/isdn_common.c linux/drivers/isdn/isdn_common.c
@@ -849,9 +849,9 @@
 }
 
 static RWTYPE
-isdn_read(struct inode *inode, struct file *file, char *buf, RWARG count)
+isdn_read(struct file *file, char *buf, RWARG count, loff_t *off)
 {
-	uint minor = MINOR(inode->i_rdev);
+	uint minor = MINOR(file->f_dentry->d_inode->i_rdev);
 	int len = 0;
 	ulong flags;
 	int drvidx;
@@ -869,7 +869,7 @@
 		if ((len = strlen(p)) <= count) {
 			if (copy_to_user(buf, p, len))
 				return -EFAULT;
-			file->f_pos += len;
+			*off += len;
 			return len;
 		}
 		return 0;
@@ -886,7 +886,7 @@
 		save_flags(flags);
 		cli();
 		len = isdn_readbchan(drvidx, chidx, buf, 0, count, 1);
-		file->f_pos += len;
+		*off += len;
 		restore_flags(flags);
 		return len;
 	}
@@ -912,7 +912,7 @@
 		else
 			dev->drv[drvidx]->stavail = 0;
 		restore_flags(flags);
-		file->f_pos += len;
+		*off += len;
 		return len;
 	}
 #ifdef CONFIG_ISDN_PPP
@@ -928,9 +928,9 @@
 }
 
 static RWTYPE
-isdn_write(struct inode *inode, struct file *file, const char *buf, RWARG count)
+isdn_write(struct file *file, const char *buf, RWARG count, loff_t * off)
 {
-	uint minor = MINOR(inode->i_rdev);
+	uint minor = MINOR(file->f_dentry->d_inode->i_rdev);
 	int drvidx;
 	int chidx;
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov