]> err.no Git - linux-2.6/blobdiff - drivers/ide/legacy/falconide.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
[linux-2.6] / drivers / ide / legacy / falconide.c
index e1e9d9d6893fdd82990abdf124ae049c4e23c681..2860956bdcb079196c199e91af40163615670043 100644 (file)
@@ -8,6 +8,7 @@
  *  more details.
  */
 
+#include <linux/module.h>
 #include <linux/types.h>
 #include <linux/mm.h>
 #include <linux/interrupt.h>
@@ -54,25 +55,38 @@ static int falconide_offsets[IDE_NR_PORTS] __initdata = {
      */
 
 int falconide_intr_lock;
+EXPORT_SYMBOL(falconide_intr_lock);
 
 
     /*
      *  Probe for a Falcon IDE interface
      */
 
-void __init falconide_init(void)
+static int __init falconide_init(void)
 {
     if (MACH_IS_ATARI && ATARIHW_PRESENT(IDE)) {
        hw_regs_t hw;
-       int index;
+
+       printk(KERN_INFO "ide: Falcon IDE controller\n");
 
        ide_setup_ports(&hw, ATA_HD_BASE, falconide_offsets,
                        0, 0, NULL,
 //                     falconide_iops,
                        IRQ_MFP_IDE);
-       index = ide_register_hw(&hw, 1, NULL);
 
-       if (index != -1)
-           printk("ide%d: Falcon IDE interface\n", index);
+       hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
+       if (hwif) {
+               u8 index = hwif->index;
+               u8 idx[4] = { index, 0xff, 0xff, 0xff };
+
+               ide_init_port_data(hwif, index);
+               ide_init_port_hw(hwif, &hw);
+
+               ide_device_add(idx);
+       }
     }
+
+    return 0;
 }
+
+module_init(falconide_init);