From: Christoph Hellwig As it's using the obsolete MOD_{INC,DEC}_USE_COUNT it's implicitly locked already, but let's remove them and make it explicit so these macros can go away completely without breaking m68k compile. Signed-off-by: Andrew Morton --- 25-akpm/drivers/block/amiflop.c | 16 ++-------------- 1 files changed, 2 insertions(+), 14 deletions(-) diff -puN drivers/block/amiflop.c~mark-amiflop-non-unloadable drivers/block/amiflop.c --- 25/drivers/block/amiflop.c~mark-amiflop-non-unloadable 2004-09-12 22:51:02.178056496 -0700 +++ 25-akpm/drivers/block/amiflop.c 2004-09-12 22:51:02.183055736 -0700 @@ -386,16 +386,6 @@ static void fd_motor_off(unsigned long d fd_select(drive); udelay (1); fd_deselect(drive); - -#ifdef MODULE -/* - this is the last interrupt for any drive access, happens after - release (from floppy_off). So we have to wait until now to decrease - the use count. -*/ - if (decusecount) - MOD_DEC_USE_COUNT; -#endif } static void floppy_off (unsigned int nr) @@ -1590,10 +1580,6 @@ static int floppy_open(struct inode *ino local_irq_save(flags); fd_ref[drive]++; fd_device[drive] = system; -#ifdef MODULE - if (unit[drive].motor == 0) - MOD_INC_USE_COUNT; -#endif local_irq_restore(flags); unit[drive].dtype=&data_types[system]; @@ -1839,6 +1825,7 @@ int init_module(void) return amiga_floppy_init(); } +#if 0 /* not safe to unload */ void cleanup_module(void) { int i; @@ -1860,3 +1847,4 @@ void cleanup_module(void) unregister_blkdev(FLOPPY_MAJOR, "fd"); } #endif +#endif _