summaryrefslogtreecommitdiffstats
path: root/sys/mips
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2011-11-22 21:28:20 +0000
committermarius <marius@FreeBSD.org>2011-11-22 21:28:20 +0000
commit17e14c6132be998c8e8d0c2fc89ff0b66d24999c (patch)
tree4941db3a873a5f9b2ccc4a64c23bf5cd65516206 /sys/mips
parent6479d45e1526c99672febf3a29a6a99305871131 (diff)
downloadFreeBSD-src-17e14c6132be998c8e8d0c2fc89ff0b66d24999c.zip
FreeBSD-src-17e14c6132be998c8e8d0c2fc89ff0b66d24999c.tar.gz
- 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.
Diffstat (limited to 'sys/mips')
-rw-r--r--sys/mips/adm5120/admpci.c3
-rw-r--r--sys/mips/atheros/apb.c3
-rw-r--r--sys/mips/atheros/ar71xx_ehci.c5
-rw-r--r--sys/mips/atheros/ar71xx_ohci.c5
-rw-r--r--sys/mips/atheros/ar71xx_pci.c3
-rw-r--r--sys/mips/atheros/ar724x_pci.c3
-rw-r--r--sys/mips/atheros/if_arge.c6
-rw-r--r--sys/mips/cavium/octopci.c3
-rw-r--r--sys/mips/cavium/usb/octusb_octeon.c5
-rw-r--r--sys/mips/idt/idtpci.c3
-rw-r--r--sys/mips/idt/if_kr.c6
-rw-r--r--sys/mips/malta/gt.c3
-rw-r--r--sys/mips/malta/gt_pci.c3
-rw-r--r--sys/mips/nlm/xlp_pci.c3
-rw-r--r--sys/mips/rmi/dev/nlge/if_nlge.c4
-rw-r--r--sys/mips/rmi/dev/sec/rmisec.c6
-rw-r--r--sys/mips/rmi/xlr_pci.c3
-rw-r--r--sys/mips/rmi/xls_ehci.c5
-rw-r--r--sys/mips/rt305x/rt305x_dotg.c5
19 files changed, 19 insertions, 58 deletions
diff --git a/sys/mips/adm5120/admpci.c b/sys/mips/adm5120/admpci.c
index 0ae7530..616d3bd 100644
--- a/sys/mips/adm5120/admpci.c
+++ b/sys/mips/adm5120/admpci.c
@@ -473,7 +473,6 @@ static device_method_t admpci_methods[] = {
DEVMETHOD(device_resume, bus_generic_resume),
/* Bus interface */
- DEVMETHOD(bus_print_child, bus_generic_print_child),
DEVMETHOD(bus_read_ivar, admpci_read_ivar),
DEVMETHOD(bus_write_ivar, admpci_write_ivar),
DEVMETHOD(bus_alloc_resource, admpci_alloc_resource),
@@ -489,7 +488,7 @@ static device_method_t admpci_methods[] = {
DEVMETHOD(pcib_write_config, admpci_write_config),
DEVMETHOD(pcib_route_interrupt, admpci_route_interrupt),
- {0, 0}
+ DEVMETHOD_END
};
static driver_t admpci_driver = {
diff --git a/sys/mips/atheros/apb.c b/sys/mips/atheros/apb.c
index 42c0157..a2f6163 100644
--- a/sys/mips/atheros/apb.c
+++ b/sys/mips/atheros/apb.c
@@ -455,7 +455,6 @@ static device_method_t apb_methods[] = {
DEVMETHOD(bus_deactivate_resource, apb_deactivate_resource),
DEVMETHOD(bus_get_resource_list, apb_get_resource_list),
DEVMETHOD(bus_hinted_child, apb_hinted_child),
- DEVMETHOD(bus_print_child, bus_generic_print_child),
DEVMETHOD(bus_release_resource, apb_release_resource),
DEVMETHOD(bus_setup_intr, apb_setup_intr),
DEVMETHOD(bus_teardown_intr, apb_teardown_intr),
@@ -464,7 +463,7 @@ static device_method_t apb_methods[] = {
DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource),
DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource),
- {0, 0},
+ DEVMETHOD_END
};
static driver_t apb_driver = {
diff --git a/sys/mips/atheros/ar71xx_ehci.c b/sys/mips/atheros/ar71xx_ehci.c
index 9f5b894..7d2c1cc 100644
--- a/sys/mips/atheros/ar71xx_ehci.c
+++ b/sys/mips/atheros/ar71xx_ehci.c
@@ -284,10 +284,7 @@ static device_method_t ehci_methods[] = {
DEVMETHOD(device_resume, ar71xx_ehci_resume),
DEVMETHOD(device_shutdown, ar71xx_ehci_shutdown),
- /* Bus interface */
- DEVMETHOD(bus_print_child, bus_generic_print_child),
-
- {0, 0}
+ DEVMETHOD_END
};
static driver_t ehci_driver = {
diff --git a/sys/mips/atheros/ar71xx_ohci.c b/sys/mips/atheros/ar71xx_ohci.c
index bee353e..4ccd8c2 100644
--- a/sys/mips/atheros/ar71xx_ohci.c
+++ b/sys/mips/atheros/ar71xx_ohci.c
@@ -196,10 +196,7 @@ static device_method_t ohci_methods[] = {
DEVMETHOD(device_detach, ar71xx_ohci_detach),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
- /* Bus interface */
- DEVMETHOD(bus_print_child, bus_generic_print_child),
-
- {0, 0}
+ DEVMETHOD_END
};
static driver_t ohci_driver = {
diff --git a/sys/mips/atheros/ar71xx_pci.c b/sys/mips/atheros/ar71xx_pci.c
index 709d42e..a6c7c1b 100644
--- a/sys/mips/atheros/ar71xx_pci.c
+++ b/sys/mips/atheros/ar71xx_pci.c
@@ -538,7 +538,6 @@ static device_method_t ar71xx_pci_methods[] = {
DEVMETHOD(device_resume, bus_generic_resume),
/* Bus interface */
- DEVMETHOD(bus_print_child, bus_generic_print_child),
DEVMETHOD(bus_read_ivar, ar71xx_pci_read_ivar),
DEVMETHOD(bus_write_ivar, ar71xx_pci_write_ivar),
DEVMETHOD(bus_alloc_resource, ar71xx_pci_alloc_resource),
@@ -554,7 +553,7 @@ static device_method_t ar71xx_pci_methods[] = {
DEVMETHOD(pcib_write_config, ar71xx_pci_write_config),
DEVMETHOD(pcib_route_interrupt, ar71xx_pci_route_interrupt),
- {0, 0}
+ DEVMETHOD_END
};
static driver_t ar71xx_pci_driver = {
diff --git a/sys/mips/atheros/ar724x_pci.c b/sys/mips/atheros/ar724x_pci.c
index 36586a2..59be9c0 100644
--- a/sys/mips/atheros/ar724x_pci.c
+++ b/sys/mips/atheros/ar724x_pci.c
@@ -573,7 +573,6 @@ static device_method_t ar724x_pci_methods[] = {
DEVMETHOD(device_resume, bus_generic_resume),
/* Bus interface */
- DEVMETHOD(bus_print_child, bus_generic_print_child),
DEVMETHOD(bus_read_ivar, ar724x_pci_read_ivar),
DEVMETHOD(bus_write_ivar, ar724x_pci_write_ivar),
DEVMETHOD(bus_alloc_resource, ar724x_pci_alloc_resource),
@@ -589,7 +588,7 @@ static device_method_t ar724x_pci_methods[] = {
DEVMETHOD(pcib_write_config, ar724x_pci_write_config),
DEVMETHOD(pcib_route_interrupt, ar724x_pci_route_interrupt),
- {0, 0}
+ DEVMETHOD_END
};
static driver_t ar724x_pci_driver = {
diff --git a/sys/mips/atheros/if_arge.c b/sys/mips/atheros/if_arge.c
index 567b9ba..be40123 100644
--- a/sys/mips/atheros/if_arge.c
+++ b/sys/mips/atheros/if_arge.c
@@ -155,16 +155,12 @@ static device_method_t arge_methods[] = {
DEVMETHOD(device_resume, arge_resume),
DEVMETHOD(device_shutdown, arge_shutdown),
- /* bus interface */
- DEVMETHOD(bus_print_child, bus_generic_print_child),
- DEVMETHOD(bus_driver_added, bus_generic_driver_added),
-
/* MII interface */
DEVMETHOD(miibus_readreg, arge_miibus_readreg),
DEVMETHOD(miibus_writereg, arge_miibus_writereg),
DEVMETHOD(miibus_statchg, arge_miibus_statchg),
- { 0, 0 }
+ DEVMETHOD_END
};
static driver_t arge_driver = {
diff --git a/sys/mips/cavium/octopci.c b/sys/mips/cavium/octopci.c
index 8477321..392aed8 100644
--- a/sys/mips/cavium/octopci.c
+++ b/sys/mips/cavium/octopci.c
@@ -962,7 +962,6 @@ static device_method_t octopci_methods[] = {
/* Bus interface */
DEVMETHOD(bus_read_ivar, octopci_read_ivar),
- DEVMETHOD(bus_print_child, bus_generic_print_child),
DEVMETHOD(bus_alloc_resource, octopci_alloc_resource),
DEVMETHOD(bus_release_resource, bus_generic_release_resource),
DEVMETHOD(bus_activate_resource,octopci_activate_resource),
@@ -978,7 +977,7 @@ static device_method_t octopci_methods[] = {
DEVMETHOD(pcib_write_config, octopci_write_config),
DEVMETHOD(pcib_route_interrupt, octopci_route_interrupt),
- {0, 0}
+ DEVMETHOD_END
};
static driver_t octopci_driver = {
diff --git a/sys/mips/cavium/usb/octusb_octeon.c b/sys/mips/cavium/usb/octusb_octeon.c
index 8bebfda..ac7b590 100644
--- a/sys/mips/cavium/usb/octusb_octeon.c
+++ b/sys/mips/cavium/usb/octusb_octeon.c
@@ -205,10 +205,7 @@ static device_method_t octusb_octeon_methods[] = {
DEVMETHOD(device_detach, octusb_octeon_detach),
DEVMETHOD(device_shutdown, octusb_octeon_shutdown),
- /* Bus interface */
- DEVMETHOD(bus_print_child, bus_generic_print_child),
-
- {0, 0}
+ DEVMETHOD_END
};
static driver_t octusb_octeon_driver = {
diff --git a/sys/mips/idt/idtpci.c b/sys/mips/idt/idtpci.c
index 2fce32d..7e003fd 100644
--- a/sys/mips/idt/idtpci.c
+++ b/sys/mips/idt/idtpci.c
@@ -528,7 +528,6 @@ static device_method_t idtpci_methods[] = {
DEVMETHOD(device_resume, bus_generic_resume),
/* Bus interface */
- DEVMETHOD(bus_print_child, bus_generic_print_child),
DEVMETHOD(bus_read_ivar, idtpci_read_ivar),
DEVMETHOD(bus_write_ivar, idtpci_write_ivar),
DEVMETHOD(bus_alloc_resource, idtpci_alloc_resource),
@@ -544,7 +543,7 @@ static device_method_t idtpci_methods[] = {
DEVMETHOD(pcib_write_config, idtpci_write_config),
DEVMETHOD(pcib_route_interrupt, idtpci_route_interrupt),
- {0, 0}
+ DEVMETHOD_END
};
static driver_t idtpci_driver = {
diff --git a/sys/mips/idt/if_kr.c b/sys/mips/idt/if_kr.c
index 243968d..b43defa 100644
--- a/sys/mips/idt/if_kr.c
+++ b/sys/mips/idt/if_kr.c
@@ -118,16 +118,12 @@ static device_method_t kr_methods[] = {
DEVMETHOD(device_resume, kr_resume),
DEVMETHOD(device_shutdown, kr_shutdown),
- /* bus interface */
- DEVMETHOD(bus_print_child, bus_generic_print_child),
- DEVMETHOD(bus_driver_added, bus_generic_driver_added),
-
/* MII interface */
DEVMETHOD(miibus_readreg, kr_miibus_readreg),
DEVMETHOD(miibus_writereg, kr_miibus_writereg),
DEVMETHOD(miibus_statchg, kr_miibus_statchg),
- { 0, 0 }
+ DEVMETHOD_END
};
static driver_t kr_driver = {
diff --git a/sys/mips/malta/gt.c b/sys/mips/malta/gt.c
index 257ac64..ce320c9 100644
--- a/sys/mips/malta/gt.c
+++ b/sys/mips/malta/gt.c
@@ -116,9 +116,8 @@ static device_method_t gt_methods[] = {
DEVMETHOD(bus_teardown_intr, gt_teardown_intr),
DEVMETHOD(bus_alloc_resource, gt_alloc_resource),
DEVMETHOD(bus_activate_resource, gt_activate_resource),
- DEVMETHOD(bus_print_child, bus_generic_print_child),
- {0, 0},
+ DEVMETHOD_END
};
static driver_t gt_driver = {
diff --git a/sys/mips/malta/gt_pci.c b/sys/mips/malta/gt_pci.c
index aa28639..0e2012e 100644
--- a/sys/mips/malta/gt_pci.c
+++ b/sys/mips/malta/gt_pci.c
@@ -724,7 +724,6 @@ static device_method_t gt_pci_methods[] = {
DEVMETHOD(device_resume, bus_generic_resume),
/* Bus interface */
- DEVMETHOD(bus_print_child, bus_generic_print_child),
DEVMETHOD(bus_read_ivar, gt_read_ivar),
DEVMETHOD(bus_write_ivar, gt_write_ivar),
DEVMETHOD(bus_alloc_resource, gt_pci_alloc_resource),
@@ -740,7 +739,7 @@ static device_method_t gt_pci_methods[] = {
DEVMETHOD(pcib_write_config, gt_pci_write_config),
DEVMETHOD(pcib_route_interrupt, gt_pci_route_interrupt),
- {0, 0}
+ DEVMETHOD_END
};
static driver_t gt_pci_driver = {
diff --git a/sys/mips/nlm/xlp_pci.c b/sys/mips/nlm/xlp_pci.c
index bb98c80..4b0a333 100644
--- a/sys/mips/nlm/xlp_pci.c
+++ b/sys/mips/nlm/xlp_pci.c
@@ -634,7 +634,6 @@ static device_method_t xlp_pcib_methods[] = {
DEVMETHOD(device_attach, xlp_pcib_attach),
/* Bus interface */
- DEVMETHOD(bus_print_child, bus_generic_print_child),
DEVMETHOD(bus_read_ivar, xlp_pcib_read_ivar),
DEVMETHOD(bus_write_ivar, xlp_pcib_write_ivar),
DEVMETHOD(bus_alloc_resource, xlp_pci_alloc_resource),
@@ -655,7 +654,7 @@ static device_method_t xlp_pcib_methods[] = {
DEVMETHOD(pcib_release_msi, xlp_release_msi),
DEVMETHOD(pcib_map_msi, xlp_map_msi),
- {0, 0}
+ DEVMETHOD_END
};
static driver_t xlp_pcib_driver = {
diff --git a/sys/mips/rmi/dev/nlge/if_nlge.c b/sys/mips/rmi/dev/nlge/if_nlge.c
index 7b8845f..a25ebe3 100644
--- a/sys/mips/rmi/dev/nlge/if_nlge.c
+++ b/sys/mips/rmi/dev/nlge/if_nlge.c
@@ -257,10 +257,8 @@ static device_method_t nlna_methods[] = {
/* bus interface : TBD : what are these for ? */
DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
- DEVMETHOD(bus_print_child, bus_generic_print_child),
- DEVMETHOD(bus_driver_added, bus_generic_driver_added),
- { 0, 0 }
+ DEVMETHOD_END
};
static driver_t nlna_driver = {
diff --git a/sys/mips/rmi/dev/sec/rmisec.c b/sys/mips/rmi/dev/sec/rmisec.c
index 5e00307..6501f75 100644
--- a/sys/mips/rmi/dev/sec/rmisec.c
+++ b/sys/mips/rmi/dev/sec/rmisec.c
@@ -76,16 +76,12 @@ static device_method_t xlr_sec_methods[] = {
DEVMETHOD(device_attach, xlr_sec_attach),
DEVMETHOD(device_detach, xlr_sec_detach),
- /* bus interface */
- DEVMETHOD(bus_print_child, bus_generic_print_child),
- DEVMETHOD(bus_driver_added, bus_generic_driver_added),
-
/* crypto device methods */
DEVMETHOD(cryptodev_newsession, xlr_sec_newsession),
DEVMETHOD(cryptodev_freesession,xlr_sec_freesession),
DEVMETHOD(cryptodev_process, xlr_sec_process),
- {0, 0}
+ DEVMETHOD_END
};
static driver_t xlr_sec_driver = {
diff --git a/sys/mips/rmi/xlr_pci.c b/sys/mips/rmi/xlr_pci.c
index 29db1b6..feea696 100644
--- a/sys/mips/rmi/xlr_pci.c
+++ b/sys/mips/rmi/xlr_pci.c
@@ -627,7 +627,6 @@ static device_method_t xlr_pcib_methods[] = {
DEVMETHOD(device_attach, xlr_pcib_attach),
/* Bus interface */
- DEVMETHOD(bus_print_child, bus_generic_print_child),
DEVMETHOD(bus_read_ivar, xlr_pcib_read_ivar),
DEVMETHOD(bus_write_ivar, xlr_pcib_write_ivar),
DEVMETHOD(bus_alloc_resource, xlr_pci_alloc_resource),
@@ -648,7 +647,7 @@ static device_method_t xlr_pcib_methods[] = {
DEVMETHOD(pcib_release_msi, xlr_release_msi),
DEVMETHOD(pcib_map_msi, xlr_map_msi),
- {0, 0}
+ DEVMETHOD_END
};
static driver_t xlr_pcib_driver = {
diff --git a/sys/mips/rmi/xls_ehci.c b/sys/mips/rmi/xls_ehci.c
index 5c7a536..b0360f3 100644
--- a/sys/mips/rmi/xls_ehci.c
+++ b/sys/mips/rmi/xls_ehci.c
@@ -252,10 +252,7 @@ static device_method_t ehci_methods[] = {
DEVMETHOD(device_resume, ehci_xls_resume),
DEVMETHOD(device_shutdown, ehci_xls_shutdown),
- /* Bus interface */
- DEVMETHOD(bus_print_child, bus_generic_print_child),
-
- {0, 0}
+ DEVMETHOD_END
};
static driver_t ehci_driver = {
diff --git a/sys/mips/rt305x/rt305x_dotg.c b/sys/mips/rt305x/rt305x_dotg.c
index 32ebbfe..144f3ad 100644
--- a/sys/mips/rt305x/rt305x_dotg.c
+++ b/sys/mips/rt305x/rt305x_dotg.c
@@ -230,10 +230,7 @@ static device_method_t dotg_obio_methods[] = {
DEVMETHOD(device_detach, dotg_obio_detach),
DEVMETHOD(device_shutdown, dotg_obio_shutdown),
- /* Bus interface */
- DEVMETHOD(bus_print_child, bus_generic_print_child),
-
- {0, 0}
+ DEVMETHOD_END
};
static driver_t dotg_obio_driver = {
OpenPOWER on IntegriCloud