]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/ide/legacy/ide-cs.c
gayle: reserve memory resources at once
[karo-tx-linux.git] / drivers / ide / legacy / ide-cs.c
index 3381424d70a195ed70bb3525e0160d96c18af033..f93d5454ebf8c66515962682627d81bd32451b78 100644 (file)
@@ -63,11 +63,9 @@ MODULE_LICENSE("Dual MPL/GPL");
 
 #define INT_MODULE_PARM(n, v) static int n = v; module_param(n, int, 0)
 
-#ifdef PCMCIA_DEBUG
-INT_MODULE_PARM(pc_debug, PCMCIA_DEBUG);
+#ifdef CONFIG_PCMCIA_DEBUG
+INT_MODULE_PARM(pc_debug, 0);
 #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
-static char *version =
-"ide-cs.c 1.3 2002/10/26 05:45:31 (David Hinds)";
 #else
 #define DEBUG(n, args...)
 #endif
@@ -154,12 +152,17 @@ static const struct ide_port_ops idecs_port_ops = {
        .quirkproc              = ide_undecoded_slave,
 };
 
+static const struct ide_port_info idecs_port_info = {
+       .port_ops               = &idecs_port_ops,
+       .host_flags             = IDE_HFLAG_NO_DMA,
+};
+
 static ide_hwif_t *idecs_register(unsigned long io, unsigned long ctl,
                                unsigned long irq, struct pcmcia_device *handle)
 {
     ide_hwif_t *hwif;
-    hw_regs_t hw;
     int i;
+    hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL };
     u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
 
     if (!request_region(io, 8, DRV_NAME)) {
@@ -185,15 +188,9 @@ static ide_hwif_t *idecs_register(unsigned long io, unsigned long ctl,
     if (hwif == NULL)
        goto out_release;
 
-    i = hwif->index;
-
-    ide_init_port_data(hwif, i);
-    ide_init_port_hw(hwif, &hw);
-    hwif->port_ops = &idecs_port_ops;
-
-    idx[0] = i;
+    idx[0] = hwif->index;
 
-    ide_device_add(idx, NULL);
+    ide_device_add(idx, &idecs_port_info, hws);
 
     if (hwif->present)
        return hwif;
@@ -375,7 +372,7 @@ failed:
 
 ======================================================================*/
 
-void ide_release(struct pcmcia_device *link)
+static void ide_release(struct pcmcia_device *link)
 {
     ide_info_t *info = link->priv;
     ide_hwif_t *hwif = info->hwif;