Skip to contentSkip to conversation

amiga_floppy_init() in non-modular case

PATCH New Al Viro 1 participant 1 message Oct 11, 2006 Block layer

lore
Share & tools
lore

Al Viro

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/block/amiflop.c |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)
drivers/block/amiflop.c +5 -8
index 5d254b7..5d65621 100644
@@ -1709,10 +1709,13 @@ static struct kobject *floppy_find(dev_t
 	return get_disk(unit[drive].gendisk);
 }
 
-int __init amiga_floppy_init(void)
+static int __init amiga_floppy_init(void)
 {
 	int i, ret;
 
+	if (!MACH_IS_AMIGA)
+		return -ENXIO;
+
 	if (!AMIGAHW_PRESENT(AMI_FLOPPY))
 		return -ENXIO;
 
@@ -1809,15 +1812,9 @@ out_blkdev:
 	return ret;
 }
 
+module_init(amiga_floppy_init);
 #ifdef MODULE
 
-int init_module(void)
-{
-	if (!MACH_IS_AMIGA)
-		return -ENXIO;
-	return amiga_floppy_init();
-}
-
 #if 0 /* not safe to unload */
 void cleanup_module(void)
 {
Signature · 1 line
1.4.2.GIT