]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ide: add ->dev and ->host_priv fields to struct ide_host
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Thu, 24 Jul 2008 20:53:14 +0000 (22:53 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Thu, 24 Jul 2008 20:53:14 +0000 (22:53 +0200)
* Add 'struct device *dev[2]' and 'void *host_priv' fields
  to struct ide_host.

* Set ->dev[] in ide_host_alloc_all()/ide_setup_pci_device[s]().

* Pass 'void *priv' argument to ide_setup_pci_device[s]()
  and use it to set ->host_priv.

* Set PCI dev's ->driver_data to point to the struct ide_host
  instance if PCI host driver wants to use ->host_priv.

* Rename ide_setup_pci_device[s]() to ide_pci_init_{one,two}().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
33 files changed:
drivers/ide/ide-probe.c
drivers/ide/pci/aec62xx.c
drivers/ide/pci/alim15x3.c
drivers/ide/pci/amd74xx.c
drivers/ide/pci/atiixp.c
drivers/ide/pci/cmd64x.c
drivers/ide/pci/cs5530.c
drivers/ide/pci/cs5535.c
drivers/ide/pci/cy82c693.c
drivers/ide/pci/generic.c
drivers/ide/pci/hpt34x.c
drivers/ide/pci/hpt366.c
drivers/ide/pci/it8213.c
drivers/ide/pci/it821x.c
drivers/ide/pci/jmicron.c
drivers/ide/pci/ns87415.c
drivers/ide/pci/opti621.c
drivers/ide/pci/pdc202xx_new.c
drivers/ide/pci/pdc202xx_old.c
drivers/ide/pci/piix.c
drivers/ide/pci/rz1000.c
drivers/ide/pci/sc1200.c
drivers/ide/pci/serverworks.c
drivers/ide/pci/siimage.c
drivers/ide/pci/sis5513.c
drivers/ide/pci/sl82c105.c
drivers/ide/pci/slc90e66.c
drivers/ide/pci/tc86c001.c
drivers/ide/pci/triflex.c
drivers/ide/pci/trm290.c
drivers/ide/pci/via82cxxx.c
drivers/ide/setup-pci.c
include/linux/ide.h

index 4aa76c45375562450dfe836d955dcddf9e27e799..890c15b1b3aec919273b7d0db8cb2353d7f5566a 100644 (file)
@@ -1604,6 +1604,9 @@ struct ide_host *ide_host_alloc_all(const struct ide_port_info *d,
                return NULL;
        }
 
+       if (hws[0])
+               host->dev[0] = hws[0]->dev;
+
        return host;
 }
 EXPORT_SYMBOL_GPL(ide_host_alloc_all);
index fbc43e121e6b19856f4ceb528c299d5dd682656e..7a5d246fe9b11f924302582882f0c93b3c1df349 100644 (file)
@@ -273,7 +273,7 @@ static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_devi
                }
        }
 
-       err = ide_setup_pci_device(dev, &d);
+       err = ide_pci_init_one(dev, &d, NULL);
        if (err)
                pci_disable_device(dev);
 
index 5ef7817ac64f852e5042f45a281ea243bcf4a802..7f96e7ca386427be58c73a2e37da7c1e471dfef1 100644 (file)
@@ -565,7 +565,7 @@ static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_dev
        if (idx == 0)
                d.host_flags |= IDE_HFLAG_CLEAR_SIMPLEX;
 
-       return ide_setup_pci_device(dev, &d);
+       return ide_pci_init_one(dev, &d, NULL);
 }
 
 
index ef7d971031eee6bad1aef03c49aedec4e6369c78..b6a475313c7c1de855c4bd243a0622db1d65891d 100644 (file)
@@ -302,7 +302,7 @@ static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_
                         d.name, pci_name(dev), dev->revision,
                         amd_dma[fls(d.udma_mask) - 1]);
 
-       return ide_setup_pci_device(dev, &d);
+       return ide_pci_init_one(dev, &d, NULL);
 }
 
 static const struct pci_device_id amd74xx_pci_tbl[] = {
index 8b637181681ad2d6d4cfcbf30c39d6e6044b9bc6..b483a68b39f63edde1945aab54555b256c9baf94 100644 (file)
@@ -167,7 +167,7 @@ static const struct ide_port_info atiixp_pci_info[] __devinitdata = {
 
 static int __devinit atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-       return ide_setup_pci_device(dev, &atiixp_pci_info[id->driver_data]);
+       return ide_pci_init_one(dev, &atiixp_pci_info[id->driver_data], NULL);
 }
 
 static const struct pci_device_id atiixp_pci_tbl[] = {
index ce58bfcdb3c6c645c51b70321d799dfa0157524b..fc0333c9a4e596d9029f3f28948695752129ea3b 100644 (file)
@@ -507,7 +507,7 @@ static int __devinit cmd64x_init_one(struct pci_dev *dev, const struct pci_devic
                }
        }
 
-       return ide_setup_pci_device(dev, &d);
+       return ide_pci_init_one(dev, &d, NULL);
 }
 
 static const struct pci_device_id cmd64x_pci_tbl[] = {
index f5534c1ff349841b10ace33856a5b587b2e19860..ba82bad8bf4ecd5147c78c3726baf7c78f7a7e86 100644 (file)
@@ -256,7 +256,7 @@ static const struct ide_port_info cs5530_chipset __devinitdata = {
 
 static int __devinit cs5530_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-       return ide_setup_pci_device(dev, &cs5530_chipset);
+       return ide_pci_init_one(dev, &cs5530_chipset, NULL);
 }
 
 static const struct pci_device_id cs5530_pci_tbl[] = {
index 5404fe4f701d79cc4bc651c99548ce35da9d4c67..2161f43ca1b8d39f4353514c8b9482e6f7c06414 100644 (file)
@@ -180,7 +180,7 @@ static const struct ide_port_info cs5535_chipset __devinitdata = {
 static int __devinit cs5535_init_one(struct pci_dev *dev,
                                        const struct pci_device_id *id)
 {
-       return ide_setup_pci_device(dev, &cs5535_chipset);
+       return ide_pci_init_one(dev, &cs5535_chipset, NULL);
 }
 
 static const struct pci_device_id cs5535_pci_tbl[] = {
index e14ad5530fa4b0c1e1369387d43e4e73d8ac8b7b..abd27ed7c30c18312e91123afc845725232decb9 100644 (file)
@@ -419,7 +419,7 @@ static int __devinit cy82c693_init_one(struct pci_dev *dev, const struct pci_dev
        if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE &&
            PCI_FUNC(dev->devfn) == 1) {
                dev2 = pci_get_slot(dev->bus, dev->devfn + 1);
-               ret = ide_setup_pci_devices(dev, dev2, &cy82c693_chipset);
+               ret = ide_pci_init_two(dev, dev2, &cy82c693_chipset, NULL);
                /* We leak pci refs here but thats ok - we can't be unloaded */
        }
        return ret;
index 041720e22762840aefbad8a151d5c0ed7e5159f1..dd0caea5e4f30013b35c26873b6e3691aeffab28 100644 (file)
@@ -139,7 +139,7 @@ static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_devi
                        goto out;
                }
        }
-       ret = ide_setup_pci_device(dev, d);
+       ret = ide_pci_init_one(dev, d, NULL);
 out:
        return ret;
 }
index 9e1d1c4741da5567509c28a671ea9e82aa410139..3d70c5150ac6ac90ae15f0a2d535706cce58bd2c 100644 (file)
@@ -156,7 +156,7 @@ static int __devinit hpt34x_init_one(struct pci_dev *dev, const struct pci_devic
 
        d = &hpt34x_chipsets[(pcicmd & PCI_COMMAND_MEMORY) ? 1 : 0];
 
-       return ide_setup_pci_device(dev, d);
+       return ide_pci_init_one(dev, d, NULL);
 }
 
 static const struct pci_device_id hpt34x_pci_tbl[] = {
index 1f1135ce7cd6616f9626c062013168e6d5b3af9c..b23b7a27800538537470c164295a79f05188e9a0 100644 (file)
@@ -1608,13 +1608,13 @@ static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_devic
                                d.host_flags &= ~IDE_HFLAG_NON_BOOTABLE;
                }
 
-               ret = ide_setup_pci_devices(dev, dev2, &d);
+               ret = ide_pci_init_two(dev, dev2, &d, NULL);
                if (ret < 0)
                        pci_dev_put(dev2);
                return ret;
        }
 
-       return ide_setup_pci_device(dev, &d);
+       return ide_pci_init_one(dev, &d, NULL);
 }
 
 static const struct pci_device_id hpt366_pci_tbl[] __devinitconst = {
index 2b71bdf74e73a2557c1f2c033bfb5306c684cbdc..18219fa9ef01b9e761ff3191a103974f62f329ab 100644 (file)
@@ -184,7 +184,7 @@ static const struct ide_port_info it8213_chipsets[] __devinitdata = {
 
 static int __devinit it8213_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-       return ide_setup_pci_device(dev, &it8213_chipsets[id->driver_data]);
+       return ide_pci_init_one(dev, &it8213_chipsets[id->driver_data], NULL);
 }
 
 static const struct pci_device_id it8213_pci_tbl[] = {
index cbf647202994d2c273fd8a3d9d6cf38eac29fe54..40186f9e56aad0b440e8dc736691617409e42bdf 100644 (file)
@@ -664,7 +664,7 @@ static int __devinit it821x_init_one(struct pci_dev *dev, const struct pci_devic
 
        pci_set_drvdata(dev, itdevs);
 
-       return ide_setup_pci_device(dev, &it821x_chipsets[id->driver_data]);
+       return ide_pci_init_one(dev, &it821x_chipsets[id->driver_data], NULL);
 }
 
 static const struct pci_device_id it821x_pci_tbl[] = {
index 96ef7394f28395b5646bee8f3ae9e319be3dcc90..a7e3c14f7b07b978a5b7903b3f18339765bb5304 100644 (file)
@@ -121,7 +121,7 @@ static const struct ide_port_info jmicron_chipset __devinitdata = {
 
 static int __devinit jmicron_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-       return ide_setup_pci_device(dev, &jmicron_chipset);
+       return ide_pci_init_one(dev, &jmicron_chipset, NULL);
 }
 
 /* All JMB PATA controllers have and will continue to have the same
index 5cd2b32ff0ef000d61a06047bddb19f9a911c342..a45c33c0c7924dcf75c5ef4ae0648b7ae47f35aa 100644 (file)
@@ -324,7 +324,7 @@ static int __devinit ns87415_init_one(struct pci_dev *dev, const struct pci_devi
                d.tp_ops = &superio_tp_ops;
        }
 #endif
-       return ide_setup_pci_device(dev, &d);
+       return ide_pci_init_one(dev, &d, NULL);
 }
 
 static const struct pci_device_id ns87415_pci_tbl[] = {
index 725c80508d909b593ba2fea5580d9f15de225ff9..edb9132ffbe4e01ac43cb0d09821a0137648db0a 100644 (file)
@@ -209,7 +209,7 @@ static const struct ide_port_info opti621_chipset __devinitdata = {
 
 static int __devinit opti621_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-       return ide_setup_pci_device(dev, &opti621_chipset);
+       return ide_pci_init_one(dev, &opti621_chipset, NULL);
 }
 
 static const struct pci_device_id opti621_pci_tbl[] = {
index 070df8ab3b218946ac69b2804bb9ebafce7a48de..71a420feb981c7be9e93f2958867ce7ed85f1bdd 100644 (file)
@@ -524,7 +524,7 @@ static int __devinit pdc202new_init_one(struct pci_dev *dev, const struct pci_de
                dev2 = pdc20270_get_dev2(dev);
 
                if (dev2) {
-                       int ret = ide_setup_pci_devices(dev, dev2, d);
+                       int ret = ide_pci_init_two(dev, dev2, d, NULL);
                        if (ret < 0)
                                pci_dev_put(dev2);
                        return ret;
@@ -540,7 +540,7 @@ static int __devinit pdc202new_init_one(struct pci_dev *dev, const struct pci_de
                return -ENODEV;
        }
 
-       return ide_setup_pci_device(dev, d);
+       return ide_pci_init_one(dev, d, NULL);
 }
 
 static const struct pci_device_id pdc202new_pci_tbl[] = {
index e54dc653b8c4aa609edbb6d16a0ab85e0bfa034b..eba1d60a73a05610cb10dd6b0ef86b4c9b7f8b54 100644 (file)
@@ -412,7 +412,7 @@ static int __devinit pdc202xx_init_one(struct pci_dev *dev, const struct pci_dev
                }
        }
 
-       return ide_setup_pci_device(dev, d);
+       return ide_pci_init_one(dev, d, NULL);
 }
 
 static const struct pci_device_id pdc202xx_pci_tbl[] = {
index 0ce41b4dddafc543855f7c491c8fcf6599b666d2..359f65ddcbf9139e60a032261a2cf192a4db3b49 100644 (file)
@@ -394,7 +394,7 @@ static const struct ide_port_info piix_pci_info[] __devinitdata = {
  
 static int __devinit piix_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-       return ide_setup_pci_device(dev, &piix_pci_info[id->driver_data]);
+       return ide_pci_init_one(dev, &piix_pci_info[id->driver_data], NULL);
 }
 
 /**
index 532154adba2945738d27cb30066c292f2a09c05f..860ffdeca0952c4dc89e8070249fd4bdb49bf281 100644 (file)
@@ -48,7 +48,7 @@ static const struct ide_port_info rz1000_chipset __devinitdata = {
 
 static int __devinit rz1000_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-       return ide_setup_pci_device(dev, &rz1000_chipset);
+       return ide_pci_init_one(dev, &rz1000_chipset, NULL);
 }
 
 static const struct pci_device_id rz1000_pci_tbl[] = {
index 14c787b5d95f89c8fd6406d22cd82ef72d4322bb..8fd9cc2119d63ce5713f614fe3576412355ba9df 100644 (file)
@@ -317,7 +317,7 @@ static const struct ide_port_info sc1200_chipset __devinitdata = {
 
 static int __devinit sc1200_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-       return ide_setup_pci_device(dev, &sc1200_chipset);
+       return ide_pci_init_one(dev, &sc1200_chipset, NULL);
 }
 
 static const struct pci_device_id sc1200_pci_tbl[] = {
index 127ccb45e261c23cb799bcb1e886141155f4b779..34abdfc8d5676b4678309a756ed7b40e79e49ef4 100644 (file)
@@ -422,7 +422,7 @@ static int __devinit svwks_init_one(struct pci_dev *dev, const struct pci_device
                        d.host_flags &= ~IDE_HFLAG_SINGLE;
        }
 
-       return ide_setup_pci_device(dev, &d);
+       return ide_pci_init_one(dev, &d, NULL);
 }
 
 static const struct pci_device_id svwks_pci_tbl[] = {
index 5965a35d94ae75a7c64c57fb0def8e5aed27ef0f..48124133601acfe0257db9526b2529f08068c052 100644 (file)
@@ -795,7 +795,7 @@ static int __devinit siimage_init_one(struct pci_dev *dev,
                d.host_flags |= IDE_HFLAG_NO_ATAPI_DMA;
        }
 
-       return ide_setup_pci_device(dev, &d);
+       return ide_pci_init_one(dev, &d, NULL);
 }
 
 static const struct pci_device_id siimage_pci_tbl[] = {
index 2389945ca95d0c2a86b22ef90d5b8a2743fc6585..a2330c4ac75b07eb292363f9bf60cc2dc00867b9 100644 (file)
@@ -583,7 +583,7 @@ static int __devinit sis5513_init_one(struct pci_dev *dev, const struct pci_devi
 
        d.udma_mask = udma_rates[chipset_family];
 
-       return ide_setup_pci_device(dev, &d);
+       return ide_pci_init_one(dev, &d, NULL);
 }
 
 static const struct pci_device_id sis5513_pci_tbl[] = {
index f82a6502c1b721069bc1cadbeff89028dc97fc77..be22f8125d7107093b57ff6eb3b37d81260283b4 100644 (file)
@@ -335,7 +335,7 @@ static int __devinit sl82c105_init_one(struct pci_dev *dev, const struct pci_dev
                d.host_flags &= ~IDE_HFLAG_SERIALIZE_DMA;
        }
 
-       return ide_setup_pci_device(dev, &d);
+       return ide_pci_init_one(dev, &d, NULL);
 }
 
 static const struct pci_device_id sl82c105_pci_tbl[] = {
index dae6e2c94d865dbdef0d8df0710ccdfe90854f53..2fc2f2cf22063b4d5ae220d8b2a1ea5cb7e1d99f 100644 (file)
@@ -144,7 +144,7 @@ static const struct ide_port_info slc90e66_chipset __devinitdata = {
 
 static int __devinit slc90e66_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-       return ide_setup_pci_device(dev, &slc90e66_chipset);
+       return ide_pci_init_one(dev, &slc90e66_chipset, NULL);
 }
 
 static const struct pci_device_id slc90e66_pci_tbl[] = {
index 477e1979010230d4f1662af093b535520d9ccd95..e16e79d2177232af2a5412be9fb1b574bb40d16c 100644 (file)
@@ -215,7 +215,7 @@ static const struct ide_port_info tc86c001_chipset __devinitdata = {
 static int __devinit tc86c001_init_one(struct pci_dev *dev,
                                       const struct pci_device_id *id)
 {
-       return ide_setup_pci_device(dev, &tc86c001_chipset);
+       return ide_pci_init_one(dev, &tc86c001_chipset, NULL);
 }
 
 static const struct pci_device_id tc86c001_pci_tbl[] = {
index db65a558d4eca62b26bff026d5c6fa3682d69555..60dcb645d1b091edad266247d248066c5081f300 100644 (file)
@@ -104,7 +104,7 @@ static const struct ide_port_info triflex_device __devinitdata = {
 static int __devinit triflex_init_one(struct pci_dev *dev, 
                const struct pci_device_id *id)
 {
-       return ide_setup_pci_device(dev, &triflex_device);
+       return ide_pci_init_one(dev, &triflex_device, NULL);
 }
 
 static const struct pci_device_id triflex_pci_tbl[] = {
index a8a3138682eff4841ac9784a4cce9d46f3ba1a89..d8127b51a542347ddcc18655bca6066f2b8d20fb 100644 (file)
@@ -340,7 +340,7 @@ static const struct ide_port_info trm290_chipset __devinitdata = {
 
 static int __devinit trm290_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-       return ide_setup_pci_device(dev, &trm290_chipset);
+       return ide_pci_init_one(dev, &trm290_chipset, NULL);
 }
 
 static const struct pci_device_id trm290_pci_tbl[] = {
index 09dc4803ef9d282c528240dee980f4d55f080a79..2f22abfe003bf9686631f1046223f222b0ffa279 100644 (file)
@@ -466,7 +466,7 @@ static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_i
 
        d.udma_mask = via_config->udma_mask;
 
-       return ide_setup_pci_device(dev, &d);
+       return ide_pci_init_one(dev, &d, NULL);
 }
 
 static const struct pci_device_id via_pci_tbl[] = {
index b85de71fdc881f7b358c7c57b73b05459db583b5..ca17bf8896df19e02736ddbb81a6da602dc60cde 100644 (file)
@@ -525,8 +525,10 @@ out:
        return ret;
 }
 
-int ide_setup_pci_device(struct pci_dev *dev, const struct ide_port_info *d)
+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 };
        int ret;
 
@@ -536,6 +538,19 @@ int ide_setup_pci_device(struct pci_dev *dev, const struct ide_port_info *d)
 
        ide_pci_setup_ports(dev, d, 0, &hw[0], &hws[0]);
 
+       host = ide_host_alloc(d, hws);
+       if (host == NULL) {
+               ret = -ENOMEM;
+               goto out;
+       }
+
+       host->dev[0] = &dev->dev;
+
+       host->host_priv = priv;
+
+       if (priv)
+               pci_set_drvdata(dev, host);
+
        ret = do_ide_setup_pci_device(dev, d, 1);
        if (ret < 0)
                goto out;
@@ -543,16 +558,19 @@ int ide_setup_pci_device(struct pci_dev *dev, const struct ide_port_info *d)
        /* fixup IRQ */
        hw[1].irq = hw[0].irq = ret;
 
-       ret = ide_host_add(d, hws, NULL);
+       ret = ide_host_register(host, d, hws);
+       if (ret)
+               ide_host_free(host);
 out:
        return ret;
 }
-EXPORT_SYMBOL_GPL(ide_setup_pci_device);
+EXPORT_SYMBOL_GPL(ide_pci_init_one);
 
-int ide_setup_pci_devices(struct pci_dev *dev1, struct pci_dev *dev2,
-                         const struct ide_port_info *d)
+int ide_pci_init_two(struct pci_dev *dev1, struct pci_dev *dev2,
+                    const struct ide_port_info *d, void *priv)
 {
        struct pci_dev *pdev[] = { dev1, dev2 };
+       struct ide_host *host;
        int ret, i;
        hw_regs_t hw[4], *hws[] = { NULL, NULL, NULL, NULL };
 
@@ -562,7 +580,25 @@ int ide_setup_pci_devices(struct pci_dev *dev1, struct pci_dev *dev2,
                        goto out;
 
                ide_pci_setup_ports(pdev[i], d, 0, &hw[i*2], &hws[i*2]);
+       }
 
+       host = ide_host_alloc(d, hws);
+       if (host == NULL) {
+               ret = -ENOMEM;
+               goto out;
+       }
+
+       host->dev[0] = &dev1->dev;
+       host->dev[1] = &dev2->dev;
+
+       host->host_priv = priv;
+
+       if (priv) {
+               pci_set_drvdata(pdev[0], host);
+               pci_set_drvdata(pdev[1], host);
+       }
+
+       for (i = 0; i < 2; i++) {
                ret = do_ide_setup_pci_device(pdev[i], d, !i);
 
                /*
@@ -576,8 +612,10 @@ int ide_setup_pci_devices(struct pci_dev *dev1, struct pci_dev *dev2,
                hw[i*2 + 1].irq = hw[i*2].irq = ret;
        }
 
-       ret = ide_host_add(d, hws, NULL);
+       ret = ide_host_register(host, d, hws);
+       if (ret)
+               ide_host_free(host);
 out:
        return ret;
 }
-EXPORT_SYMBOL_GPL(ide_setup_pci_devices);
+EXPORT_SYMBOL_GPL(ide_pci_init_two);
index d67ccca2b96472b229ffd264642ff420aae66cba..776c574c96401410871f4efeaa7e02c709be334b 100644 (file)
@@ -626,6 +626,8 @@ typedef struct hwif_s {
 struct ide_host {
        ide_hwif_t      *ports[MAX_HWIFS];
        unsigned int    n_ports;
+       struct device   *dev[2];
+       void            *host_priv;
 };
 
 /*
@@ -1201,8 +1203,9 @@ struct ide_port_info {
        u8                      udma_mask;
 };
 
-int ide_setup_pci_device(struct pci_dev *, const struct ide_port_info *);
-int ide_setup_pci_devices(struct pci_dev *, struct pci_dev *, const struct ide_port_info *);
+int ide_pci_init_one(struct pci_dev *, const struct ide_port_info *, void *);
+int ide_pci_init_two(struct pci_dev *, struct pci_dev *,
+                    const struct ide_port_info *, void *);
 
 void ide_map_sg(ide_drive_t *, struct request *);
 void ide_init_sg_cmd(ide_drive_t *, struct request *);