ide: add struct ide_host (take 3)
[deliverable/linux.git] / drivers / ide / pci / cs5520.c
index e8e7df1915bf2a08ffc87984208ebe9f3584520a..b8ec06d22c613331be5f1ca12ff4cc4e34537ecc 100644 (file)
@@ -114,9 +114,9 @@ static const struct ide_port_info cyrix_chipsets[] __devinitdata = {
  
 static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
+       struct ide_host *host;
        const struct ide_port_info *d = &cyrix_chipsets[id->driver_data];
        hw_regs_t hw[4], *hws[] = { NULL, NULL, NULL, NULL };
-       u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
 
        ide_setup_pci_noise(dev, d);
 
@@ -138,9 +138,11 @@ static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_devic
         *      do all the device setup for us
         */
 
-       ide_pci_setup_ports(dev, d, 14, &idx[0], &hw[0], &hws[0]);
+       ide_pci_setup_ports(dev, d, 14, &hw[0], &hws[0]);
 
-       ide_device_add(idx, d, hws);
+       host = ide_host_alloc(d, hws);
+       if (host)
+               ide_host_register(host, d, hws);
 
        return 0;
 }
This page took 0.024293 seconds and 5 git commands to generate.