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

Next file: linux/drivers/acorn/char/serial-card.c
Previous file: linux/arch/sparc64/vmlinux.lds
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.9/linux/drivers/acorn/block/mfmhd.c linux/drivers/acorn/block/mfmhd.c
@@ -1210,6 +1210,8 @@
 
 	case BLKGETSIZE:
 		return put_user (mfm[minor].nr_sects, (long *)arg);
+	case BLKGETSIZE64:
+		return put_user ((u64)mfm[minor].nr_sects << 9, (u64 *)arg);
 
 	case BLKFRASET:
 		if (!capable(CAP_SYS_ADMIN))
@@ -1311,15 +1313,13 @@
 }
 
 static struct gendisk mfm_gendisk = {
-	MAJOR_NR,		/* Major number */
-	"mfm",			/* Major name */
-	6,			/* Bits to shift to get real from partition */
-	1 << 6,			/* Number of partitions per real */
-	mfm,			/* hd struct */
-	mfm_sizes,		/* block sizes */
-	0,			/* number */
-	(void *) mfm_info,	/* internal */
-	NULL			/* next */
+	major:		MAJOR_NR,
+	major_name:	"mfm",
+	minor_shift:	6,
+	max_p:		1 << 6,
+	part:		mfm,
+	sizes:		mfm_sizes,
+	real_devices:	(void *)mfm_info,
 };
 
 static struct block_device_operations mfm_fops =
@@ -1450,10 +1450,7 @@
 	blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
 	read_ahead[MAJOR_NR] = 8;	/* 8 sector (4kB?) read ahread */
 
-#ifndef MODULE
-	mfm_gendisk.next = gendisk_head;
-	gendisk_head = &mfm_gendisk;
-#endif
+	add_gendisk(&mfm_gendisk);
 
 	Busy = 0;
 	lastspecifieddrive = -1;
@@ -1501,6 +1498,10 @@
 }
 
 #ifdef MODULE
+
+EXPORT_NO_SYMBOLS;
+MODULE_LICENSE("GPL");
+
 int init_module(void)
 {
 	return mfm_init();
@@ -1512,6 +1513,7 @@
 		outw (0, mfm_irqenable);	/* Required to enable IRQs from MFM podule */
 	free_irq(mfm_irq, NULL);
 	unregister_blkdev(MAJOR_NR, "mfm");
+	del_gendisk(&mfm_gendisk);
 	if (ecs)
 		ecard_release(ecs);
 	if (mfm_addr)

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