]> err.no Git - linux-2.6/blobdiff - drivers/ide/pci/rz1000.c
x86: add MAP_STACK mmap flag
[linux-2.6] / drivers / ide / pci / rz1000.c
index 7ed6625819d4c79df46eb8457688238ec7ef22ba..8d11ee838a2a825702f31a56429a1f25dd663010 100644 (file)
 #include <linux/types.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
-#include <linux/delay.h>
-#include <linux/timer.h>
-#include <linux/mm.h>
-#include <linux/ioport.h>
-#include <linux/blkdev.h>
 #include <linux/hdreg.h>
 #include <linux/pci.h>
 #include <linux/ide.h>
 #include <linux/init.h>
 
-#include <asm/io.h>
+#define DRV_NAME "rz1000"
 
 static void __devinit init_hwif_rz1000 (ide_hwif_t *hwif)
 {
@@ -40,23 +35,22 @@ static void __devinit init_hwif_rz1000 (ide_hwif_t *hwif)
        } else {
                if (hwif->mate)
                        hwif->mate->serialized = hwif->serialized = 1;
-               hwif->drives[0].no_unmask = 1;
-               hwif->drives[1].no_unmask = 1;
+               hwif->host_flags |= IDE_HFLAG_NO_UNMASK_IRQS;
                printk(KERN_INFO "%s: serialized, disabled unmasking "
                        "(buggy RZ1000/RZ1001)\n", hwif->name);
        }
 }
 
 static const struct ide_port_info rz1000_chipset __devinitdata = {
-       .name           = "RZ100x",
+       .name           = DRV_NAME,
        .init_hwif      = init_hwif_rz1000,
        .chipset        = ide_rz1000,
-       .host_flags     = IDE_HFLAG_NO_DMA | IDE_HFLAG_BOOTABLE,
+       .host_flags     = IDE_HFLAG_NO_DMA,
 };
 
 static int __devinit rz1000_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-       return ide_setup_pci_device(dev, &rz1000_chipset);
+       return ide_pci_init_one(dev, &rz1000_chipset, NULL);
 }
 
 static const struct pci_device_id rz1000_pci_tbl[] = {
@@ -70,6 +64,7 @@ static struct pci_driver driver = {
        .name           = "RZ1000_IDE",
        .id_table       = rz1000_pci_tbl,
        .probe          = rz1000_init_one,
+       .remove         = ide_pci_remove,
 };
 
 static int __init rz1000_ide_init(void)
@@ -77,7 +72,13 @@ static int __init rz1000_ide_init(void)
        return ide_pci_register_driver(&driver);
 }
 
+static void __exit rz1000_ide_exit(void)
+{
+       pci_unregister_driver(&driver);
+}
+
 module_init(rz1000_ide_init);
+module_exit(rz1000_ide_exit);
 
 MODULE_AUTHOR("Andre Hedrick");
 MODULE_DESCRIPTION("PCI driver module for RZ1000 IDE");