patch-2.3.48 linux/fs/devices.c

Next file: linux/fs/devpts/devpts_i.h
Previous file: linux/fs/devfs/base.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.47/linux/fs/devices.c linux/fs/devices.c
@@ -160,10 +160,6 @@
 	open:		chrdev_open,
 };
 
-static struct inode_operations chrdev_inode_operations = {
-	&def_chr_fops		/* default file operations */
-};
-
 /*
  * Print device name (in decimal, hexadecimal or symbolic)
  * Note: returns pointer to static data!
@@ -189,16 +185,15 @@
 void init_special_inode(struct inode *inode, umode_t mode, int rdev)
 {
 	inode->i_mode = mode;
-	inode->i_op = NULL;
 	if (S_ISCHR(mode)) {
-		inode->i_op = &chrdev_inode_operations;
+		inode->i_fop = &def_chr_fops;
 		inode->i_rdev = to_kdev_t(rdev);
 	} else if (S_ISBLK(mode)) {
-		inode->i_op = &blkdev_inode_operations;
+		inode->i_fop = &def_blk_fops;
 		inode->i_rdev = to_kdev_t(rdev);
 		inode->i_bdev = bdget(rdev);
 	} else if (S_ISFIFO(mode))
-		inode->i_op = &fifo_inode_operations;
+		inode->i_fop = &def_fifo_fops;
 	else if (S_ISSOCK(mode))
 		;
 	else

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)