diff options
author | mav <mav@FreeBSD.org> | 2009-02-18 22:17:48 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2009-02-18 22:17:48 +0000 |
commit | f10246717a6419e9755a0fbdd0a21da8b769c8f9 (patch) | |
tree | c51d12167c13be63889b1950e54f936d14b2ba41 /sys/dev/ata/chipsets/ata-via.c | |
parent | bf75b4612ae760eeef7dbe0b2544c2532419caac (diff) | |
download | FreeBSD-src-f10246717a6419e9755a0fbdd0a21da8b769c8f9.zip FreeBSD-src-f10246717a6419e9755a0fbdd0a21da8b769c8f9.tar.gz |
As soon as they called in only same one place (ata_pcichannel_attach()),
join allocate() and dmainit() atapci subdriver's channel initialization
methods into single ch_attach() method.
As opposite to ch_attach() add new ch_detach() method to deallocate/disable
channel.
Diffstat (limited to 'sys/dev/ata/chipsets/ata-via.c')
-rw-r--r-- | sys/dev/ata/chipsets/ata-via.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ata/chipsets/ata-via.c b/sys/dev/ata/chipsets/ata-via.c index 04d9904..29146ef 100644 --- a/sys/dev/ata/chipsets/ata-via.c +++ b/sys/dev/ata/chipsets/ata-via.c @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); /* local prototypes */ static int ata_via_chipinit(device_t dev); -static int ata_via_allocate(device_t dev); +static int ata_via_ch_attach(device_t dev); static void ata_via_reset(device_t dev); static void ata_via_old_setmode(device_t dev, int mode); static void ata_via_southbridge_fixup(device_t dev); @@ -139,7 +139,7 @@ ata_via_chipinit(device_t dev) ctlr->r_rid2 = PCIR_BAR(5); if ((ctlr->r_res2 = bus_alloc_resource_any(dev, ctlr->r_type2, &ctlr->r_rid2, RF_ACTIVE))) { - ctlr->allocate = ata_via_allocate; + ctlr->ch_attach = ata_via_ch_attach; ctlr->reset = ata_via_reset; /* enable PCI interrupt */ @@ -184,7 +184,7 @@ ata_via_chipinit(device_t dev) } static int -ata_via_allocate(device_t dev) +ata_via_ch_attach(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); struct ata_channel *ch = device_get_softc(dev); @@ -218,7 +218,7 @@ ata_via_allocate(device_t dev) } else { /* setup the usual register normal pci style */ - if (ata_pci_allocate(dev)) + if (ata_pci_ch_attach(dev)) return ENXIO; } |