aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/amiflop.c
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-10-11 12:28:37 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-11 14:17:07 -0400
commit2db5f59ca74d911f93c39494db1581c3c93d5a29 (patch)
tree0c84677574d88f413e94314b904f04d753267283 /drivers/block/amiflop.c
parent2e811488cedddefb9d1df97c260b6048ea8ef835 (diff)
[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>
Diffstat (limited to 'drivers/block/amiflop.c')
-rw-r--r--drivers/block/amiflop.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c
index 5d254b714509..5d6562171533 100644
--- a/drivers/block/amiflop.c
+++ b/drivers/block/amiflop.c
@@ -1709,10 +1709,13 @@ static struct kobject *floppy_find(dev_t dev, int *part, void *data)
1709 return get_disk(unit[drive].gendisk); 1709 return get_disk(unit[drive].gendisk);
1710} 1710}
1711 1711
1712int __init amiga_floppy_init(void) 1712static int __init amiga_floppy_init(void)
1713{ 1713{
1714 int i, ret; 1714 int i, ret;
1715 1715
1716 if (!MACH_IS_AMIGA)
1717 return -ENXIO;
1718
1716 if (!AMIGAHW_PRESENT(AMI_FLOPPY)) 1719 if (!AMIGAHW_PRESENT(AMI_FLOPPY))
1717 return -ENXIO; 1720 return -ENXIO;
1718 1721
@@ -1809,15 +1812,9 @@ out_blkdev:
1809 return ret; 1812 return ret;
1810} 1813}
1811 1814
1815module_init(amiga_floppy_init);
1812#ifdef MODULE 1816#ifdef MODULE
1813 1817
1814int init_module(void)
1815{
1816 if (!MACH_IS_AMIGA)
1817 return -ENXIO;
1818 return amiga_floppy_init();
1819}
1820
1821#if 0 /* not safe to unload */ 1818#if 0 /* not safe to unload */
1822void cleanup_module(void) 1819void cleanup_module(void)
1823{ 1820{