Module Name:    src
Committed By:   dyoung
Date:           Fri Apr 17 19:44:13 UTC 2009

Modified Files:
        src/sys/dev/pci: ehci_pci.c ohci_pci.c

Log Message:
Use device_t instead of 'struct device *' or device_ptr_t.  Use cfdata_t
instead of 'struct cfdata *'. Delete some gratuitous parentheses.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/pci/ehci_pci.c \
    src/sys/dev/pci/ohci_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/ehci_pci.c
diff -u src/sys/dev/pci/ehci_pci.c:1.40 src/sys/dev/pci/ehci_pci.c:1.41
--- src/sys/dev/pci/ehci_pci.c:1.40	Fri Apr 17 17:21:31 2009
+++ src/sys/dev/pci/ehci_pci.c	Fri Apr 17 19:44:13 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci_pci.c,v 1.40 2009/04/17 17:21:31 dyoung Exp $	*/
+/*	$NetBSD: ehci_pci.c,v 1.41 2009/04/17 19:44:13 dyoung Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.40 2009/04/17 17:21:31 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.41 2009/04/17 19:44:13 dyoung Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -77,21 +77,20 @@
 #define EHCI_MAX_BIOS_WAIT		1000 /* ms */
 
 static int
-ehci_pci_match(struct device *parent, struct cfdata *match,
-    void *aux)
+ehci_pci_match(device_t parent, cfdata_t match, void *aux)
 {
 	struct pci_attach_args *pa = (struct pci_attach_args *) aux;
 
 	if (PCI_CLASS(pa->pa_class) == PCI_CLASS_SERIALBUS &&
 	    PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_SERIALBUS_USB &&
 	    PCI_INTERFACE(pa->pa_class) == PCI_INTERFACE_EHCI)
-		return (1);
+		return 1;
 
-	return (0);
+	return 0;
 }
 
 static void
-ehci_pci_attach(struct device *parent, struct device *self, void *aux)
+ehci_pci_attach(device_t parent, device_t self, void *aux)
 {
 	struct ehci_pci_softc *sc = device_private(self);
 	struct pci_attach_args *pa = (struct pci_attach_args *)aux;
@@ -221,7 +220,7 @@
 }
 
 static int
-ehci_pci_detach(device_ptr_t self, int flags)
+ehci_pci_detach(device_t self, int flags)
 {
 	struct ehci_pci_softc *sc = device_private(self);
 	int rv;
@@ -229,7 +228,7 @@
 	pmf_device_deregister(self);
 	rv = ehci_detach(&sc->sc, flags);
 	if (rv)
-		return (rv);
+		return rv;
 
 	/* disable interrupts */
 	EOWRITE2(&sc->sc, EHCI_USBINTR, 0);
@@ -246,7 +245,7 @@
 		sc->sc.sc_size = 0;
 	}
 
-	return (0);
+	return 0;
 }
 
 CFATTACH_DECL3_NEW(ehci_pci, sizeof(struct ehci_pci_softc),
Index: src/sys/dev/pci/ohci_pci.c
diff -u src/sys/dev/pci/ohci_pci.c:1.40 src/sys/dev/pci/ohci_pci.c:1.41
--- src/sys/dev/pci/ohci_pci.c:1.40	Fri Apr 17 17:31:01 2009
+++ src/sys/dev/pci/ohci_pci.c	Fri Apr 17 19:44:13 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci_pci.c,v 1.40 2009/04/17 17:31:01 dyoung Exp $	*/
+/*	$NetBSD: ohci_pci.c,v 1.41 2009/04/17 19:44:13 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci_pci.c,v 1.40 2009/04/17 17:31:01 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci_pci.c,v 1.41 2009/04/17 19:44:13 dyoung Exp $");
 
 #include "ehci.h"
 
@@ -66,16 +66,16 @@
 };
 
 static int
-ohci_pci_match(device_t parent, struct cfdata *match, void *aux)
+ohci_pci_match(device_t parent, cfdata_t match, void *aux)
 {
 	struct pci_attach_args *pa = (struct pci_attach_args *) aux;
 
 	if (PCI_CLASS(pa->pa_class) == PCI_CLASS_SERIALBUS &&
 	    PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_SERIALBUS_USB &&
 	    PCI_INTERFACE(pa->pa_class) == PCI_INTERFACE_OHCI)
-		return (1);
+		return 1;
 
-	return (0);
+	return 0;
 }
 
 static void
@@ -163,14 +163,14 @@
 }
 
 static int
-ohci_pci_detach(device_ptr_t self, int flags)
+ohci_pci_detach(device_t self, int flags)
 {
 	struct ohci_pci_softc *sc = device_private(self);
 	int rv;
 
 	rv = ohci_detach(&sc->sc, flags);
 	if (rv)
-		return (rv);
+		return rv;
 
 	/* Disable interrupts, so we don't get any spurious ones. */
 	bus_space_write_4(sc->sc.iot, sc->sc.ioh, OHCI_INTERRUPT_DISABLE,
@@ -187,7 +187,7 @@
 #if NEHCI > 0
 	usb_pci_rem(&sc->sc_pci);
 #endif
-	return (0);
+	return 0;
 }
 
 CFATTACH_DECL2_NEW(ohci_pci, sizeof(struct ohci_pci_softc),

Reply via email to