summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/ata-pci.c
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2008-06-11 06:44:58 +0000
committersos <sos@FreeBSD.org>2008-06-11 06:44:58 +0000
commit6fdb33f67f30e3be620213816a0a37968119589e (patch)
tree11a66ceb59dec3746ff1c5e0c626af3070422713 /sys/dev/ata/ata-pci.c
parent4f61d04fd875738269e8ba5c57aac378c2d5051e (diff)
downloadFreeBSD-src-6fdb33f67f30e3be620213816a0a37968119589e.zip
FreeBSD-src-6fdb33f67f30e3be620213816a0a37968119589e.tar.gz
Rearrange how to call dma.alloc() so that we have resources alloc'd when need but also late enough to know how many to create.
Diffstat (limited to 'sys/dev/ata/ata-pci.c')
-rw-r--r--sys/dev/ata/ata-pci.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/dev/ata/ata-pci.c b/sys/dev/ata/ata-pci.c
index 0b9d526..a3cb7990 100644
--- a/sys/dev/ata/ata-pci.c
+++ b/sys/dev/ata/ata-pci.c
@@ -611,7 +611,6 @@ static int
ata_pcichannel_attach(device_t dev)
{
struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev));
- struct ata_channel *ch = device_get_softc(dev);
int error;
if (ctlr->dmainit)
@@ -620,11 +619,7 @@ ata_pcichannel_attach(device_t dev)
if ((error = ctlr->allocate(dev)))
return error;
- if ((error = ata_attach(dev)))
- return error;
-
- ch->dma.alloc(dev);
- return 0;
+ return ata_attach(dev);
}
static int
OpenPOWER on IntegriCloud