summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/ata-pci.c
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2003-08-25 11:13:04 +0000
committersos <sos@FreeBSD.org>2003-08-25 11:13:04 +0000
commitfd78182c7c1f22845344b00ddb5d0fd805f6a328 (patch)
tree0eebf51a98119de08fbaf09b3535177f8bf1450a /sys/dev/ata/ata-pci.c
parentae5c1bda3c396be24a4ede9d7a5be162781ac673 (diff)
downloadFreeBSD-src-fd78182c7c1f22845344b00ddb5d0fd805f6a328.zip
FreeBSD-src-fd78182c7c1f22845344b00ddb5d0fd805f6a328.tar.gz
Cleanup the dma int/alloc/free code.
Diffstat (limited to 'sys/dev/ata/ata-pci.c')
-rw-r--r--sys/dev/ata/ata-pci.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/sys/dev/ata/ata-pci.c b/sys/dev/ata/ata-pci.c
index 6a4352b..18fdfb1 100644
--- a/sys/dev/ata/ata-pci.c
+++ b/sys/dev/ata/ata-pci.c
@@ -57,7 +57,7 @@ static MALLOC_DEFINE(M_ATAPCI, "ATA PCI", "ATA driver PCI");
/* prototypes */
static int ata_pci_allocate(device_t, struct ata_channel *);
-static int ata_pci_dmainit(struct ata_channel *);
+static void ata_pci_dmainit(struct ata_channel *);
static void ata_pci_locknoop(struct ata_channel *, int);
static int
@@ -438,17 +438,14 @@ ata_pci_dmastop(struct ata_channel *ch)
return error;
}
-static int
+static void
ata_pci_dmainit(struct ata_channel *ch)
{
- int error;
-
- if ((error = ata_dmainit(ch)))
- return error;
-
- ch->dma->start = ata_pci_dmastart;
- ch->dma->stop = ata_pci_dmastop;
- return 0;
+ ata_dmainit(ch);
+ if (ch->dma) {
+ ch->dma->start = ata_pci_dmastart;
+ ch->dma->stop = ata_pci_dmastop;
+ }
}
static void
OpenPOWER on IntegriCloud