patch-2.3.40 linux/drivers/block/floppy.c

Next file: linux/drivers/block/genhd.c
Previous file: linux/drivers/block/cy82c693.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.39/linux/drivers/block/floppy.c linux/drivers/block/floppy.c
@@ -4164,6 +4164,16 @@
 		blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
 		unregister_blkdev(MAJOR_NR,"fd");		
 	}
+	
+	for (drive = 0; drive < N_DRIVE; drive++) {
+		if (!(allowed_drive_mask & (1 << drive)))
+			continue;
+		if (fdc_state[FDC(drive)].version == FDC_NONE)
+			continue;
+		for (i = 0; i<NUMBER(floppy_type); i++)
+			register_disk(NULL, MKDEV(MAJOR_NR,TOMINOR(drive)+i*4),
+					1, &floppy_fops, 0);
+	}
 	return have_no_fdc;
 }
 

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