vserver 1.9.3
[linux-2.6.git] / drivers / ide / pci / cmd64x.c
index c04122f..abea997 100644 (file)
@@ -38,8 +38,6 @@ static u8 cmd64x_proc = 0;
 static struct pci_dev *cmd_devs[CMD_MAX_DEVS];
 static int n_cmd_devs;
 
-#undef DEBUG_CMD_REGS
-
 static char * print_cmd64x_get_info (char *buf, struct pci_dev *dev, int index)
 {
        char *p = buf;
@@ -49,9 +47,6 @@ static char * print_cmd64x_get_info (char *buf, struct pci_dev *dev, int index)
        u8 reg72 = 0, reg73 = 0;                        /* primary */
        u8 reg7a = 0, reg7b = 0;                        /* secondary */
        u8 reg50 = 0, reg71 = 0;                        /* extra */
-#ifdef DEBUG_CMD_REGS
-       u8 hi_byte = 0, lo_byte = 0;
-#endif /* DEBUG_CMD_REGS */
 
        p += sprintf(p, "\nController: %d\n", index);
        p += sprintf(p, "CMD%x Chipset.\n", dev->device);
@@ -127,18 +122,6 @@ static char * print_cmd64x_get_info (char *buf, struct pci_dev *dev, int index)
                (reg71 & MRDMODE_BLK_CH0) ? "blocked" : "enabled",
                (reg71 & MRDMODE_BLK_CH1) ? "blocked" : "enabled");
 
-#ifdef DEBUG_CMD_REGS
-       SPLIT_BYTE(reg50, hi_byte, lo_byte);
-       p += sprintf(p, "CFR       = 0x%02x, HI = 0x%02x, "
-                       "LOW = 0x%02x\n", reg50, hi_byte, lo_byte);
-       SPLIT_BYTE(reg57, hi_byte, lo_byte);
-       p += sprintf(p, "ARTTIM23  = 0x%02x, HI = 0x%02x, "
-                       "LOW = 0x%02x\n", reg57, hi_byte, lo_byte);
-       SPLIT_BYTE(reg71, hi_byte, lo_byte);
-       p += sprintf(p, "MRDMODE   = 0x%02x, HI = 0x%02x, "
-                       "LOW = 0x%02x\n", reg71, hi_byte, lo_byte);
-#endif /* DEBUG_CMD_REGS */
-
        return (char *)p;
 }
 
@@ -586,7 +569,7 @@ static int cmd646_1_ide_dma_end (ide_drive_t *drive)
        return (dma_stat & 7) != 4;
 }
 
-static unsigned int __init init_chipset_cmd64x (struct pci_dev *dev, const char *name)
+static unsigned int __devinit init_chipset_cmd64x(struct pci_dev *dev, const char *name)
 {
        u32 class_rev = 0;
        u8 mrdmode = 0;
@@ -674,7 +657,7 @@ static unsigned int __init init_chipset_cmd64x (struct pci_dev *dev, const char
        return 0;
 }
 
-static unsigned int __init ata66_cmd64x (ide_hwif_t *hwif)
+static unsigned int __devinit ata66_cmd64x(ide_hwif_t *hwif)
 {
        u8 ata66 = 0, mask = (hwif->channel) ? 0x02 : 0x01;
 
@@ -689,7 +672,7 @@ static unsigned int __init ata66_cmd64x (ide_hwif_t *hwif)
        return (ata66 & mask) ? 1 : 0;
 }
 
-static void __init init_hwif_cmd64x (ide_hwif_t *hwif)
+static void __devinit init_hwif_cmd64x(ide_hwif_t *hwif)
 {
        struct pci_dev *dev     = hwif->pci_dev;
        unsigned int class_rev;
@@ -746,10 +729,7 @@ static void __init init_hwif_cmd64x (ide_hwif_t *hwif)
 
 static int __devinit cmd64x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-       ide_pci_device_t *d = &cmd64x_chipsets[id->driver_data];
-       if (dev->device != d->device)
-               BUG();
-       ide_setup_pci_device(dev, d);
+       ide_setup_pci_device(dev, &cmd64x_chipsets[id->driver_data]);
        return 0;
 }
 
@@ -763,7 +743,7 @@ static struct pci_device_id cmd64x_pci_tbl[] = {
 MODULE_DEVICE_TABLE(pci, cmd64x_pci_tbl);
 
 static struct pci_driver driver = {
-       .name           = "CMD64x IDE",
+       .name           = "CMD64x_IDE",
        .id_table       = cmd64x_pci_tbl,
        .probe          = cmd64x_init_one,
 };