Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] amiga_floppy_init() in non-modular case

It used to be called directly, but that got lost in 2.1.87-pre1.
Similar breakage in ataflop got fixed 3 years ago, this one
had gone unnoticed.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Al Viro and committed by
Linus Torvalds
2db5f59c 2e811488

+5 -8
+5 -8
drivers/block/amiflop.c
··· 1709 1709 return get_disk(unit[drive].gendisk); 1710 1710 } 1711 1711 1712 - int __init amiga_floppy_init(void) 1712 + static int __init amiga_floppy_init(void) 1713 1713 { 1714 1714 int i, ret; 1715 + 1716 + if (!MACH_IS_AMIGA) 1717 + return -ENXIO; 1715 1718 1716 1719 if (!AMIGAHW_PRESENT(AMI_FLOPPY)) 1717 1720 return -ENXIO; ··· 1812 1809 return ret; 1813 1810 } 1814 1811 1812 + module_init(amiga_floppy_init); 1815 1813 #ifdef MODULE 1816 - 1817 - int init_module(void) 1818 - { 1819 - if (!MACH_IS_AMIGA) 1820 - return -ENXIO; 1821 - return amiga_floppy_init(); 1822 - } 1823 1814 1824 1815 #if 0 /* not safe to unload */ 1825 1816 void cleanup_module(void)