Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Initialize some members little earlier. It's not...



details:   https://anonhg.NetBSD.org/src/rev/7038a8c805b4
branches:  trunk
changeset: 809477:7038a8c805b4
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Wed Jul 15 03:54:53 2015 +0000

description:
Initialize some members little earlier. It's not a bug.

diffstat:

 sys/dev/pci/ehci_pci.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (47 lines):

diff -r c6c96518b601 -r 7038a8c805b4 sys/dev/pci/ehci_pci.c
--- a/sys/dev/pci/ehci_pci.c    Wed Jul 15 03:28:55 2015 +0000
+++ b/sys/dev/pci/ehci_pci.c    Wed Jul 15 03:54:53 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ehci_pci.c,v 1.59 2014/09/21 14:30:22 christos Exp $   */
+/*     $NetBSD: ehci_pci.c,v 1.60 2015/07/15 03:54:53 msaitoh 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.59 2014/09/21 14:30:22 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.60 2015/07/15 03:54:53 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -142,15 +142,15 @@
                return;
        }
 
+       sc->sc_pc = pc;
+       sc->sc_tag = tag;
+       sc->sc.sc_bus.dmatag = pa->pa_dmat;
+
        /* Disable interrupts, so we don't get any spurious ones. */
        sc->sc.sc_offs = EREAD1(&sc->sc, EHCI_CAPLENGTH);
        DPRINTF(("%s: offs=%d\n", device_xname(self), sc->sc.sc_offs));
        EOWRITE4(&sc->sc, EHCI_USBINTR, 0);
 
-       sc->sc_pc = pc;
-       sc->sc_tag = tag;
-       sc->sc.sc_bus.dmatag = pa->pa_dmat;
-
        /* Handle quirks */
        switch (quirk) {
        case EHCI_PCI_QUIRK_AMD_SB600:
@@ -325,7 +325,7 @@
                switch (id) {
                case EHCI_CAP_ID_LEGACY:
                        legctlsts = pci_conf_read(pc, tag,
-                                                 addr + PCI_EHCI_USBLEGCTLSTS);
+                           addr + PCI_EHCI_USBLEGCTLSTS);
                        printf("ehci_dump_caps: legsup=0x%08x "
                               "legctlsts=0x%08x\n", cap, legctlsts);
                        break;



Home | Main Index | Thread Index | Old Index