remove more old pci_findvendor code

This commit is contained in:
christos 2014-09-21 15:07:19 +00:00
parent 339c89dc93
commit a06f4a91f3
4 changed files with 16 additions and 32 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ehci_cardbus.c,v 1.31 2011/08/01 11:20:27 drochner Exp $ */
/* $NetBSD: ehci_cardbus.c,v 1.32 2014/09/21 15:07:19 christos Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ehci_cardbus.c,v 1.31 2011/08/01 11:20:27 drochner Exp $");
__KERNEL_RCSID(0, "$NetBSD: ehci_cardbus.c,v 1.32 2014/09/21 15:07:19 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -129,7 +129,6 @@ ehci_cardbus_attach(device_t parent, device_t self, void *aux)
pcireg_t csr;
char devinfo[256];
usbd_status r;
const char *vendor;
u_int ncomp;
const char *devname = device_xname(self);
struct usb_cardbus *up;
@ -171,13 +170,9 @@ ehci_cardbus_attach(device_t parent, device_t self, void *aux)
}
/* Figure out vendor for root hub descriptor. */
vendor = pci_findvendor(ca->ca_id);
sc->sc.sc_id_vendor = PCI_VENDOR(ca->ca_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(ca->ca_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

View File

@ -1,4 +1,4 @@
/* $NetBSD: ohci_cardbus.c,v 1.39 2011/08/01 11:20:28 drochner Exp $ */
/* $NetBSD: ohci_cardbus.c,v 1.40 2014/09/21 15:07:19 christos Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ohci_cardbus.c,v 1.39 2011/08/01 11:20:28 drochner Exp $");
__KERNEL_RCSID(0, "$NetBSD: ohci_cardbus.c,v 1.40 2014/09/21 15:07:19 christos Exp $");
#include "ehci_cardbus.h"
@ -109,7 +109,6 @@ ohci_cardbus_attach(device_t parent, device_t self, void *aux)
pcireg_t csr;
char devinfo[256];
usbd_status r;
const char *vendor;
const char *devname = device_xname(self);
sc->sc.sc_dev = self;
@ -149,13 +148,9 @@ ohci_cardbus_attach(device_t parent, device_t self, void *aux)
}
/* Figure out vendor for root hub descriptor. */
vendor = pci_findvendor(ca->ca_id);
sc->sc.sc_id_vendor = PCI_VENDOR(ca->ca_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(ca->ca_id));
pci_findvendor(sc->sc.sc_vendor, sizeof(sc->sc.sc_vendor),
sc->sc.sc_id_vendor);
r = ohci_init(&sc->sc);
if (r != USBD_NORMAL_COMPLETION) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: uhci_cardbus.c,v 1.20 2011/08/01 11:20:28 drochner Exp $ */
/* $NetBSD: uhci_cardbus.c,v 1.21 2014/09/21 15:07:19 christos Exp $ */
/*
* Copyright (c) 1998-2005 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uhci_cardbus.c,v 1.20 2011/08/01 11:20:28 drochner Exp $");
__KERNEL_RCSID(0, "$NetBSD: uhci_cardbus.c,v 1.21 2014/09/21 15:07:19 christos Exp $");
#include "ehci_cardbus.h"
@ -98,7 +98,6 @@ uhci_cardbus_attach(device_t parent, device_t self,
cardbus_function_tag_t cf = ct->ct_cf;
pcitag_t tag = ca->ca_tag;
pcireg_t csr;
const char *vendor;
const char *devname = device_xname(self);
char devinfo[256];
usbd_status r;
@ -156,13 +155,9 @@ uhci_cardbus_attach(device_t parent, device_t self,
}
/* Figure out vendor for root hub descriptor. */
vendor = pci_findvendor(ca->ca_id);
sc->sc.sc_id_vendor = PCI_VENDOR(ca->ca_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(ca->ca_id));
pci_findvendor(sc->sc.sc_vendor, sizeof(sc->sc.sc_vendor),
sc->sc.sc_id_vendor);
r = uhci_init(&sc->sc);
if (r != USBD_NORMAL_COMPLETION) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: cs4280.c,v 1.67 2014/09/21 14:30:22 christos Exp $ */
/* $NetBSD: cs4280.c,v 1.68 2014/09/21 15:07:19 christos Exp $ */
/*
* Copyright (c) 1999, 2000 Tatoku Ogaito. All rights reserved.
@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cs4280.c,v 1.67 2014/09/21 14:30:22 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: cs4280.c,v 1.68 2014/09/21 15:07:19 christos Exp $");
#include "midi.h"
@ -241,12 +241,11 @@ cs4280_attach(device_t parent, device_t self, void *aux)
pci_chipset_tag_t pc;
const struct cs4280_card_t *cs_card;
char const *intrstr;
const char *vendor, *product;
pcireg_t reg;
uint32_t mem;
int error;
chae vendor[PCI_VENDORSTR_LEN];
chae product[PCI_PRODUCTSTR_LEN];
char vendor[PCI_VENDORSTR_LEN];
char product[PCI_PRODUCTSTR_LEN];
char intrbuf[PCI_INTRSTR_LEN];
sc = device_private(self);