2.4.21-pre1 broke the ide-tape driver
Quoted 9 lines · Marcelo Tosatti
Quoted 3 lines
- ide-disk/ide-floppy do the test&call inside the loop rather than after, so possibly the call should be moved into the loop, and augmented to be "if (drive &&
drive->proc)ide_remove_proc_entries(...)".Yes... here is a patch which moves the
ide_remove_proc_entriesinside the detection loop. Withoutide_remove_proc_entriesinside the loop we would also not unregister more than one device /proc entries, too.Please test it, works for me.
Tested. Works for me too.
/Mikael
Quoted 27 lines
drivers/ide/ide-tape.c +8
-6@@ -6597,14 +6597,16 @@for (minor =0 ; minor <MAX_HWIFS *MAX_DRIVES ; minor++) { drive = idetape_chrdevs[minor].drive; -if (drive !=NULL &&idetape_cleanup (drive)) -printk (KERN_ERR "ide-tape: %s: cleanup_module() " -"called while still busy\n" , drive->name); - } +if (drive) { +if (idetape_cleanup (drive)) +printk (KERN_ERR "ide-tape: %s: cleanup_module() " +"called while still busy\n" , drive->name);#ifdef CONFIG_PROC_FS -if (drive->proc) -ide_remove_proc_entries (drive->proc, idetape_proc); +if (drive->proc) +ide_remove_proc_entries (drive->proc, idetape_proc);#endif + } + }ide_unregister_module (&idetape_module); }