summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/ps3
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/powerpc/ps3
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/powerpc/ps3')
-rw-r--r--sys/powerpc/ps3/ehci_ps3.c6
-rw-r--r--sys/powerpc/ps3/ohci_ps3.c5
-rw-r--r--sys/powerpc/ps3/ps3bus.c8
3 files changed, 6 insertions, 13 deletions
diff --git a/sys/powerpc/ps3/ehci_ps3.c b/sys/powerpc/ps3/ehci_ps3.c
index 317a54b..c85c9bb 100644
--- a/sys/powerpc/ps3/ehci_ps3.c
+++ b/sys/powerpc/ps3/ehci_ps3.c
@@ -153,10 +153,7 @@ static device_method_t ehci_ps3_methods[] = {
DEVMETHOD(device_probe, ehci_ps3_probe),
DEVMETHOD(device_attach, ehci_ps3_attach),
- /* Bus interface */
- DEVMETHOD(bus_print_child, bus_generic_print_child),
-
- {0, 0}
+ DEVMETHOD_END
};
static driver_t ehci_ps3_driver = {
@@ -169,4 +166,3 @@ static devclass_t ehci_ps3_devclass;
DRIVER_MODULE(ehci_ps3, ps3bus, ehci_ps3_driver, ehci_ps3_devclass, 0, 0);
MODULE_DEPEND(ehci_ps3, usb, 1, 1, 1);
-
diff --git a/sys/powerpc/ps3/ohci_ps3.c b/sys/powerpc/ps3/ohci_ps3.c
index e13435b..c16daba 100644
--- a/sys/powerpc/ps3/ohci_ps3.c
+++ b/sys/powerpc/ps3/ohci_ps3.c
@@ -151,10 +151,7 @@ static device_method_t ohci_ps3_methods[] = {
DEVMETHOD(device_probe, ohci_ps3_probe),
DEVMETHOD(device_attach, ohci_ps3_attach),
- /* Bus interface */
- DEVMETHOD(bus_print_child, bus_generic_print_child),
-
- {0, 0}
+ DEVMETHOD_END
};
static driver_t ohci_ps3_driver = {
diff --git a/sys/powerpc/ps3/ps3bus.c b/sys/powerpc/ps3/ps3bus.c
index 90f0e87..4c6ed76 100644
--- a/sys/powerpc/ps3/ps3bus.c
+++ b/sys/powerpc/ps3/ps3bus.c
@@ -22,10 +22,11 @@
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $FreeBSD$
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
@@ -104,7 +105,6 @@ static device_method_t ps3bus_methods[] = {
DEVMETHOD(device_attach, ps3bus_attach),
/* Bus interface */
- DEVMETHOD(bus_driver_added, bus_generic_driver_added),
DEVMETHOD(bus_add_child, bus_generic_add_child),
DEVMETHOD(bus_get_dma_tag, ps3bus_get_dma_tag),
DEVMETHOD(bus_print_child, ps3bus_print_child),
@@ -122,7 +122,7 @@ static device_method_t ps3bus_methods[] = {
DEVMETHOD(clock_gettime, ps3_gettime),
DEVMETHOD(clock_settime, ps3_settime),
- { 0, 0 }
+ DEVMETHOD_END
};
struct ps3bus_softc {
OpenPOWER on IntegriCloud