diff options
author | marius <marius@FreeBSD.org> | 2012-03-21 16:59:39 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2012-03-21 16:59:39 +0000 |
commit | cc444f6cf55f23db4d16615150883d872ffb5bd2 (patch) | |
tree | ecf4732c0a19395313044e11b9f3ed72b03a4eea /sys/dev/ata/ata-pci.c | |
parent | 20d817657d8db6ea88d3c8f0ab6ea12ee1a7934d (diff) | |
download | FreeBSD-src-cc444f6cf55f23db4d16615150883d872ffb5bd2.zip FreeBSD-src-cc444f6cf55f23db4d16615150883d872ffb5bd2.tar.gz |
- First pass at const'ifying ata(4) as appropriate.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers
MFC after: 1 week
Diffstat (limited to 'sys/dev/ata/ata-pci.c')
-rw-r--r-- | sys/dev/ata/ata-pci.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/ata/ata-pci.c b/sys/dev/ata/ata-pci.c index b22b5e2..f47ea82 100644 --- a/sys/dev/ata/ata-pci.c +++ b/sys/dev/ata/ata-pci.c @@ -595,7 +595,7 @@ static device_method_t ata_pci_methods[] = { DEVMETHOD(bus_print_child, ata_pci_print_child), DEVMETHOD(bus_child_location_str, ata_pci_child_location_str), - { 0, 0 } + DEVMETHOD_END }; devclass_t ata_pci_devclass; @@ -606,7 +606,7 @@ static driver_t ata_pci_driver = { sizeof(struct ata_pci_controller), }; -DRIVER_MODULE(atapci, pci, ata_pci_driver, ata_pci_devclass, 0, 0); +DRIVER_MODULE(atapci, pci, ata_pci_driver, ata_pci_devclass, NULL, NULL); MODULE_VERSION(atapci, 1); MODULE_DEPEND(atapci, ata, 1, 1, 1); @@ -773,7 +773,7 @@ static device_method_t ata_pcichannel_methods[] = { #endif DEVMETHOD(ata_reset, ata_pcichannel_reset), - { 0, 0 } + DEVMETHOD_END }; driver_t ata_pcichannel_driver = { @@ -782,7 +782,7 @@ driver_t ata_pcichannel_driver = { sizeof(struct ata_channel), }; -DRIVER_MODULE(ata, atapci, ata_pcichannel_driver, ata_devclass, 0, 0); +DRIVER_MODULE(ata, atapci, ata_pcichannel_driver, ata_devclass, NULL, NULL); /* * misc support fucntions @@ -863,8 +863,8 @@ ata_set_desc(device_t dev) device_set_desc_copy(dev, buffer); } -struct ata_chip_id * -ata_match_chip(device_t dev, struct ata_chip_id *index) +const struct ata_chip_id * +ata_match_chip(device_t dev, const struct ata_chip_id *index) { uint32_t devid; uint8_t revid; @@ -879,10 +879,10 @@ ata_match_chip(device_t dev, struct ata_chip_id *index) return (NULL); } -struct ata_chip_id * -ata_find_chip(device_t dev, struct ata_chip_id *index, int slot) +const struct ata_chip_id * +ata_find_chip(device_t dev, const struct ata_chip_id *index, int slot) { - struct ata_chip_id *idx; + const struct ata_chip_id *idx; device_t *children; int nchildren, i; uint8_t s; @@ -904,7 +904,7 @@ ata_find_chip(device_t dev, struct ata_chip_id *index, int slot) return (NULL); } -char * +const char * ata_pcivendor2str(device_t dev) { switch (pci_get_vendor(dev)) { |