]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/block/amiflop.c
[PATCH] SPI: Freescale iMX SPI controller driver (BIS+)
[linux-2.6-omap-h63xx.git] / drivers / block / amiflop.c
index 3e2530d61762f3d1a2016348afed8625eac73b21..5d6562171533ff31f226756ae025f4fe7a678be7 100644 (file)
@@ -64,6 +64,7 @@
 #include <linux/buffer_head.h>
 #include <linux/blkdev.h>
 #include <linux/elevator.h>
+#include <linux/interrupt.h>
 
 #include <asm/setup.h>
 #include <asm/uaccess.h>
@@ -208,7 +209,7 @@ static int fd_device[4] = { 0, 0, 0, 0 };
 
 /* Milliseconds timer */
 
-static irqreturn_t ms_isr(int irq, void *dummy, struct pt_regs *fp)
+static irqreturn_t ms_isr(int irq, void *dummy)
 {
        ms_busy = -1;
        wake_up(&ms_wait);
@@ -559,7 +560,7 @@ static unsigned long fd_get_drive_id(int drive)
        return (id);
 }
 
-static irqreturn_t fd_block_done(int irq, void *dummy, struct pt_regs *fp)
+static irqreturn_t fd_block_done(int irq, void *dummy)
 {
        if (block_flag)
                custom.dsklen = 0x4000;
@@ -1654,12 +1655,6 @@ static struct block_device_operations floppy_fops = {
        .media_changed  = amiga_floppy_change,
 };
 
-void __init amiga_floppy_setup (char *str, int *ints)
-{
-       printk (KERN_INFO "amiflop: Setting default df0 to %x\n", ints[1]);
-       fd_def_df0 = ints[1];
-}
-
 static int __init fd_probe_drives(void)
 {
        int drive,drives,nomem;
@@ -1714,10 +1709,13 @@ static struct kobject *floppy_find(dev_t dev, int *part, void *data)
        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;
 
@@ -1814,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)
 {
@@ -1845,4 +1837,19 @@ void cleanup_module(void)
        unregister_blkdev(FLOPPY_MAJOR, "fd");
 }
 #endif
+
+#else
+static int __init amiga_floppy_setup (char *str)
+{
+       int n;
+       if (!MACH_IS_AMIGA)
+               return 0;
+       if (!get_option(&str, &n))
+               return 0;
+       printk (KERN_INFO "amiflop: Setting default df0 to %x\n", n);
+       fd_def_df0 = n;
+       return 1;
+}
+
+__setup("floppy=", amiga_floppy_setup);
 #endif