Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386/pci adjust for the new findvendor



details:   https://anonhg.NetBSD.org/src/rev/5fa9ba00baa8
branches:  trunk
changeset: 332460:5fa9ba00baa8
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Sep 21 17:59:52 2014 +0000

description:
adjust for the new findvendor

diffstat:

 sys/arch/i386/pci/gcscehci.c |  13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)

diffs (42 lines):

diff -r 8ae956d180be -r 5fa9ba00baa8 sys/arch/i386/pci/gcscehci.c
--- a/sys/arch/i386/pci/gcscehci.c      Sun Sep 21 17:17:15 2014 +0000
+++ b/sys/arch/i386/pci/gcscehci.c      Sun Sep 21 17:59:52 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gcscehci.c,v 1.10 2014/03/29 19:28:28 christos Exp $ */
+/* $NetBSD: gcscehci.c,v 1.11 2014/09/21 17:59:52 christos Exp $ */
 
 /*
  * Copyright (c) 2001, 2002, 2007 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gcscehci.c,v 1.10 2014/03/29 19:28:28 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gcscehci.c,v 1.11 2014/09/21 17:59:52 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -96,7 +96,6 @@
        pcitag_t tag = pa->pa_tag;
        char const *intrstr;
        pci_intr_handle_t ih;
-       const char *vendor;
        const char *devname = device_xname(self);
        char devinfo[256];
        usbd_status r;
@@ -151,13 +150,9 @@
        sc->sc.sc_bus.usbrev = USBREV_2_0;
 
        /* Figure out vendor for root hub descriptor. */
-       vendor = pci_findvendor(pa->pa_id);
        sc->sc.sc_id_vendor = PCI_VENDOR(pa->pa_id);
-       if (vendor)
-               strlcpy(sc->sc.sc_vendor, vendor, sizeof(sc->sc.sc_vendor));
-       else
-               snprintf(sc->sc.sc_vendor, sizeof(sc->sc.sc_vendor),
-                   "vendor 0x%04x", PCI_VENDOR(pa->pa_id));
+       pci_findvendor(sc->sc.sc_vendor, sizeof(sc->sc.sc_vendor),
+           sc->sc.sc_id_vendor);
 
        /*
         * Find companion controllers.  According to the spec they always



Home | Main Index | Thread Index | Old Index