* [CFT][PATCH] ide-floppy cleanups/media change detection (1/5)
@ 2002-01-13 2:54 Kevin P. Fleming
0 siblings, 0 replies; only message in thread
From: Kevin P. Fleming @ 2002-01-13 2:54 UTC (permalink / raw)
To: linux-kernel; +Cc: Paul Bristow
(I am posting this to the list because my recent attempts to contact the
maintainer of this module have been unsuccessful...)
This message (and the next 4) contain five patches for the ide-floppy.c
module (against 2.4.18-pre3). The patches do the following:
1 - (cosmetic fix) make ide-floppy only emit its "ide-floppy 0.xx" banner
once per module load
2 - remove duplicate code for the Clik! drive
3 - modify ide-floppy functions to use kmalloc for a large structure instead
of the stack
4 - move common lock/unlock code into a function (instead of 4+ repetitions)
5 - implement media change detection
Patches 1-3 can stand alone, but patch 4 assumes patch 3 has been applied
(although it could be rediffed and work without patch 3). Patch 5 would
probably apply without patch 4, but with some fuzz.
Patch 1 follows:
diff -X dontdiff -urN linux/drivers/ide/ide-floppy.c
linux-1/drivers/ide/ide-floppy.c
--- linux/drivers/ide/ide-floppy.c Sat Jan 12 16:23:16 2002
+++ linux-1/drivers/ide/ide-floppy.c Sat Jan 12 16:33:08 2002
@@ -2087,8 +2087,12 @@
ide_drive_t *drive;
idefloppy_floppy_t *floppy;
int failed = 0;
+ static int first_init = 1;
- printk("ide-floppy driver " IDEFLOPPY_VERSION "\n");
+ if (first_init) {
+ printk ("ide-floppy driver " IDEFLOPPY_VERSION "\n");
+ first_init = 0;
+ }
MOD_INC_USE_COUNT;
while ((drive = ide_scan_devices (ide_floppy, idefloppy_driver.name, NULL,
failed++)) != NULL) {
if (!idefloppy_identify_device (drive, drive->id)) {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-01-13 2:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-13 2:54 [CFT][PATCH] ide-floppy cleanups/media change detection (1/5) Kevin P. Fleming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox