ide: add ide_proc_register_port()
[pandora-kernel.git] / drivers / ide / pci / cs5520.c
index 400859a..3b88a3a 100644 (file)
@@ -213,6 +213,7 @@ static ide_pci_device_t cyrix_chipsets[] __devinitdata = {
  
 static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
+       ide_hwif_t *hwif = NULL, *mate = NULL;
        ata_index_t index;
        ide_pci_device_t *d = &cyrix_chipsets[id->driver_data];
 
@@ -239,10 +240,21 @@ static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_devic
 
        ide_pci_setup_ports(dev, d, 14, &index);
 
-       if((index.b.low & 0xf0) != 0xf0)
-               probe_hwif_init(&ide_hwifs[index.b.low]);
-       if((index.b.high & 0xf0) != 0xf0)
-               probe_hwif_init(&ide_hwifs[index.b.high]);
+       if ((index.b.low & 0xf0) != 0xf0)
+               hwif = &ide_hwifs[index.b.low];
+       if ((index.b.high & 0xf0) != 0xf0)
+               mate = &ide_hwifs[index.b.high];
+
+       if (hwif)
+               probe_hwif_init(hwif);
+       if (mate)
+               probe_hwif_init(mate);
+
+       if (hwif)
+               ide_proc_register_port(hwif);
+       if (mate)
+               ide_proc_register_port(mate);
+
        return 0;
 }