diff options
author | marius <marius@FreeBSD.org> | 2015-02-08 21:31:40 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2015-02-08 21:31:40 +0000 |
commit | 182ebd19419e3a0d5c4043449358be08bcdcdf68 (patch) | |
tree | 5a0d9765ffa74b8c71bd7bf6616e80dc999886d9 /sys | |
parent | 78c1d9653a4fbf438a8c0180a9db3fc14c119b61 (diff) | |
download | FreeBSD-src-182ebd19419e3a0d5c4043449358be08bcdcdf68.zip FreeBSD-src-182ebd19419e3a0d5c4043449358be08bcdcdf68.tar.gz |
MFC: r276344
- Const'ify the ahci_ids table.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ahci/ahci.c | 14 | ||||
-rw-r--r-- | sys/dev/ahci/ahciem.c | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c index 3be4d8c..1b027b6 100644 --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -99,7 +99,7 @@ static void ahcipoll(struct cam_sim *sim); static MALLOC_DEFINE(M_AHCI, "AHCI driver", "AHCI driver data buffers"); -static struct { +static const struct { uint32_t id; uint8_t rev; const char *name; @@ -1024,14 +1024,14 @@ static device_method_t ahci_methods[] = { DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), DEVMETHOD(bus_child_location_str, ahci_child_location_str), DEVMETHOD(bus_get_dma_tag, ahci_get_dma_tag), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahci_driver = { "ahci", ahci_methods, sizeof(struct ahci_controller) }; -DRIVER_MODULE(ahci, pci, ahci_driver, ahci_devclass, 0, 0); +DRIVER_MODULE(ahci, pci, ahci_driver, ahci_devclass, NULL, NULL); static device_method_t ahci_ata_methods[] = { DEVMETHOD(device_probe, ahci_ata_probe), DEVMETHOD(device_attach, ahci_attach), @@ -1044,14 +1044,14 @@ static device_method_t ahci_ata_methods[] = { DEVMETHOD(bus_setup_intr, ahci_setup_intr), DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), DEVMETHOD(bus_child_location_str, ahci_child_location_str), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahci_ata_driver = { "ahci", ahci_ata_methods, sizeof(struct ahci_controller) }; -DRIVER_MODULE(ahci, atapci, ahci_ata_driver, ahci_devclass, 0, 0); +DRIVER_MODULE(ahci, atapci, ahci_ata_driver, ahci_devclass, NULL, NULL); MODULE_VERSION(ahci, 1); MODULE_DEPEND(ahci, cam, 1, 1, 1); @@ -1317,14 +1317,14 @@ static device_method_t ahcich_methods[] = { DEVMETHOD(device_detach, ahci_ch_detach), DEVMETHOD(device_suspend, ahci_ch_suspend), DEVMETHOD(device_resume, ahci_ch_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahcich_driver = { "ahcich", ahcich_methods, sizeof(struct ahci_channel) }; -DRIVER_MODULE(ahcich, ahci, ahcich_driver, ahcich_devclass, 0, 0); +DRIVER_MODULE(ahcich, ahci, ahcich_driver, ahcich_devclass, NULL, NULL); struct ahci_dc_cb_args { bus_addr_t maddr; diff --git a/sys/dev/ahci/ahciem.c b/sys/dev/ahci/ahciem.c index 8785a78..6871468 100644 --- a/sys/dev/ahci/ahciem.c +++ b/sys/dev/ahci/ahciem.c @@ -273,14 +273,14 @@ static device_method_t ahciem_methods[] = { DEVMETHOD(device_detach, ahci_em_detach), DEVMETHOD(device_suspend, ahci_em_suspend), DEVMETHOD(device_resume, ahci_em_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahciem_driver = { "ahciem", ahciem_methods, sizeof(struct ahci_enclosure) }; -DRIVER_MODULE(ahciem, ahci, ahciem_driver, ahciem_devclass, 0, 0); +DRIVER_MODULE(ahciem, ahci, ahciem_driver, ahciem_devclass, NULL, NULL); static void ahci_em_setleds(device_t dev, int c) |