ide: pass number of ports to ide_host_{alloc,add}() (v2)
[deliverable/linux.git] / drivers / ide / setup-pci.c
index 82519ddc9108ddb0d4a2f2a4779c0a72cb2b0809..d78f4c994517ecc1ac31a6060cd6121bb8e8b1c4 100644 (file)
@@ -538,7 +538,7 @@ int ide_pci_init_one(struct pci_dev *dev, const struct ide_port_info *d,
                     void *priv)
 {
        struct ide_host *host;
-       hw_regs_t hw[4], *hws[] = { NULL, NULL, NULL, NULL };
+       hw_regs_t hw[2], *hws[] = { NULL, NULL };
        int ret;
 
        ret = ide_setup_pci_controller(dev, d, 1);
@@ -547,7 +547,7 @@ int ide_pci_init_one(struct pci_dev *dev, const struct ide_port_info *d,
 
        ide_pci_setup_ports(dev, d, &hw[0], &hws[0]);
 
-       host = ide_host_alloc(d, hws);
+       host = ide_host_alloc(d, hws, 2);
        if (host == NULL) {
                ret = -ENOMEM;
                goto out;
@@ -596,7 +596,7 @@ int ide_pci_init_two(struct pci_dev *dev1, struct pci_dev *dev2,
                ide_pci_setup_ports(pdev[i], d, &hw[i*2], &hws[i*2]);
        }
 
-       host = ide_host_alloc(d, hws);
+       host = ide_host_alloc(d, hws, 4);
        if (host == NULL) {
                ret = -ENOMEM;
                goto out;
This page took 0.029248 seconds and 5 git commands to generate.