From 17e14c6132be998c8e8d0c2fc89ff0b66d24999c Mon Sep 17 00:00:00 2001 From: marius Date: Tue, 22 Nov 2011 21:28:20 +0000 Subject: - There's no need to overwrite the default device method with the default one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID. --- sys/pci/if_rl.c | 6 +----- sys/pci/intpm.c | 5 +---- sys/pci/viapm.c | 6 ++---- 3 files changed, 4 insertions(+), 13 deletions(-) (limited to 'sys/pci') diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c index 19b84d2..876461b 100644 --- a/sys/pci/if_rl.c +++ b/sys/pci/if_rl.c @@ -239,16 +239,12 @@ static device_method_t rl_methods[] = { DEVMETHOD(device_resume, rl_resume), DEVMETHOD(device_shutdown, rl_shutdown), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface */ DEVMETHOD(miibus_readreg, rl_miibus_readreg), DEVMETHOD(miibus_writereg, rl_miibus_writereg), DEVMETHOD(miibus_statchg, rl_miibus_statchg), - { 0, 0 } + DEVMETHOD_END }; static driver_t rl_driver = { diff --git a/sys/pci/intpm.c b/sys/pci/intpm.c index 1cbe75d..565b5a2 100644 --- a/sys/pci/intpm.c +++ b/sys/pci/intpm.c @@ -785,9 +785,6 @@ static device_method_t intsmb_methods[] = { DEVMETHOD(device_attach, intsmb_attach), DEVMETHOD(device_detach, intsmb_detach), - /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - /* SMBus interface */ DEVMETHOD(smbus_callback, intsmb_callback), DEVMETHOD(smbus_quick, intsmb_quick), @@ -801,7 +798,7 @@ static device_method_t intsmb_methods[] = { DEVMETHOD(smbus_bwrite, intsmb_bwrite), DEVMETHOD(smbus_bread, intsmb_bread), - { 0, 0 } + DEVMETHOD_END }; static driver_t intsmb_driver = { diff --git a/sys/pci/viapm.c b/sys/pci/viapm.c index 66dd3b5..0cddd07 100644 --- a/sys/pci/viapm.c +++ b/sys/pci/viapm.c @@ -954,7 +954,6 @@ static device_method_t viapm_methods[] = { DEVMETHOD(iicbb_reset, viabb_reset), /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), DEVMETHOD(bus_release_resource, bus_generic_release_resource), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), @@ -962,7 +961,7 @@ static device_method_t viapm_methods[] = { DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), - { 0, 0 } + DEVMETHOD_END }; static driver_t viapm_driver = { @@ -990,7 +989,6 @@ static device_method_t viapropm_methods[] = { DEVMETHOD(smbus_bread, viasmb_bread), /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), DEVMETHOD(bus_release_resource, bus_generic_release_resource), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), @@ -998,7 +996,7 @@ static device_method_t viapropm_methods[] = { DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), - { 0, 0 } + DEVMETHOD_END }; static driver_t viapropm_driver = { -- cgit v1.1