patch-2.4.14 linux/drivers/acorn/block/mfmhd.c

Next file: linux/drivers/acorn/char/keyb_ps2.c
Previous file: linux/arch/sparc64/mm/ultra.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.13/linux/drivers/acorn/block/mfmhd.c linux/drivers/acorn/block/mfmhd.c
@@ -1208,11 +1208,6 @@
 			return -EFAULT;
 		return 0;
 
-	case BLKGETSIZE:
-		return put_user (mfm[minor].nr_sects, (unsigned long *)arg);
-	case BLKGETSIZE64:
-		return put_user ((u64)mfm[minor].nr_sects << 9, (u64 *)arg);
-
 	case BLKFRASET:
 		if (!capable(CAP_SYS_ADMIN))
 			return -EACCES;
@@ -1230,6 +1225,8 @@
 			return -EACCES;
 		return mfm_reread_partitions(dev);
 
+	case BLKGETSIZE:
+	case BLKGETSIZE64:
 	case BLKFLSBUF:
 	case BLKROSET:
 	case BLKROGET:
@@ -1250,7 +1247,6 @@
 	if (dev >= mfm_drives)
 		return -ENODEV;
 
-	MOD_INC_USE_COUNT;
 	while (mfm_info[dev].busy)
 		sleep_on (&mfm_wait_open);
 
@@ -1265,7 +1261,6 @@
 static int mfm_release(struct inode *inode, struct file *file)
 {
 	mfm_info[DEVICE_NR(MINOR(inode->i_rdev))].access_count--;
-	MOD_DEC_USE_COUNT;
 	return 0;
 }
 
@@ -1324,6 +1319,7 @@
 
 static struct block_device_operations mfm_fops =
 {
+	owner:		THIS_MODULE,
 	open:		mfm_open,
 	release:	mfm_release,
 	ioctl:		mfm_ioctl,

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