pci_device pd_probe function changed from returning char * to returning

const char *.  Originally I was going to add casts from const char * to
    char * in some of the pci device drivers, but the reality is that the
    pci device probes return constant quoted strings.
This commit is contained in:
Matthew Dillon 1998-12-14 05:47:29 +00:00
parent f7bb75c92a
commit 35f069d08b
16 changed files with 48 additions and 48 deletions

View File

@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ahc_pci.c,v 1.2 1998/10/07 03:40:51 gibbs Exp $
* $Id: ahc_pci.c,v 1.3 1998/12/07 21:58:45 archie Exp $
*/
#include <pci.h>
@ -138,7 +138,7 @@ static u_int8_t read_brdctl(struct ahc_softc *ahc);
static struct ahc_softc *first_398X;
static char* ahc_pci_probe(pcici_t tag, pcidi_t type);
static const char* ahc_pci_probe(pcici_t tag, pcidi_t type);
static void ahc_pci_attach(pcici_t config_id, int unit);
/* Exported for use in the ahc_intr routine */
@ -154,7 +154,7 @@ static struct pci_device ahc_pci_driver = {
DATA_SET (pcidevice_set, ahc_pci_driver);
static char*
static const char*
ahc_pci_probe (pcici_t tag, pcidi_t type)
{
switch (type) {

View File

@ -1,5 +1,5 @@
/* $NetBSD: if_de.c,v 1.80 1998/09/25 18:06:53 matt Exp $ */
/* $Id: if_de.c,v 1.90 1998/11/06 02:13:13 peter Exp $ */
/* $Id: if_de.c,v 1.91 1998/11/28 00:25:32 msmith Exp $ */
/*-
* Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com)
@ -5310,7 +5310,7 @@ tulip_pci_shutdown(
}
#endif
static char*
static const char*
tulip_pci_probe(
pcici_t config_id,
pcidi_t device_id)

View File

@ -17,7 +17,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
* $Id: if_ed_p.c,v 1.12 1998/02/27 22:29:36 se Exp $
* $Id: if_ed_p.c,v 1.13 1998/03/17 10:54:23 danny Exp $
*/
#include "pci.h"
@ -51,7 +51,7 @@ static struct _pcsid
extern void *ed_attach_NE2000_pci __P((int, int));
static char* ed_pci_probe __P((pcici_t tag, pcidi_t type));
static const char* ed_pci_probe __P((pcici_t tag, pcidi_t type));
static void ed_pci_attach __P((pcici_t config_id, int unit));
static u_long ed_pci_count = NED;
@ -66,7 +66,7 @@ static struct pci_device ed_pci_driver = {
DATA_SET (pcidevice_set, ed_pci_driver);
static char*
static const char*
ed_pci_probe (pcici_t tag, pcidi_t type)
{
struct _pcsid *ep =pci_ids;

View File

@ -27,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: if_fxp.c,v 1.57 1998/10/11 06:28:54 dg Exp $
* $Id: if_fxp.c,v 1.58 1998/10/22 02:00:49 dg Exp $
*/
/*
@ -485,7 +485,7 @@ fxp_ether_ioctl(ifp, cmd, data)
#else /* __FreeBSD__ */
static u_long fxp_count;
static char *fxp_probe __P((pcici_t, pcidi_t));
static const char *fxp_probe __P((pcici_t, pcidi_t));
static void fxp_attach __P((pcici_t, int));
static void fxp_shutdown __P((int, void *));
@ -502,7 +502,7 @@ DATA_SET(pcidevice_set, fxp_device);
/*
* Return identification string if this is device is ours.
*/
static char *
static const char *
fxp_probe(config_id, device_id)
pcici_t config_id;
pcidi_t device_id;

View File

@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: pcivar.h,v 1.21 1998/09/15 08:21:09 gibbs Exp $
* $Id: pcivar.h,v 1.22 1998/10/06 14:18:40 dfr Exp $
*
*/
@ -199,7 +199,7 @@ extern int pci_mechanism;
struct pci_device {
char* pd_name;
char* (*pd_probe ) (pcici_t tag, pcidi_t type);
const char* (*pd_probe ) (pcici_t tag, pcidi_t type);
void (*pd_attach) (pcici_t tag, int unit);
u_long *pd_count;
int (*pd_shutdown) (int, int);

View File

@ -47,7 +47,7 @@
#include <dev/vx/if_vxreg.h>
static void vx_pci_shutdown(int, void *);
static char *vx_pci_probe(pcici_t, pcidi_t);
static const char *vx_pci_probe(pcici_t, pcidi_t);
static void vx_pci_attach(pcici_t, int unit);
static void
@ -59,7 +59,7 @@ vx_pci_shutdown(
vxfree(sc);
}
static char*
static const char*
vx_pci_probe(
pcici_t config_id,
pcidi_t device_id)

View File

@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ahc_pci.c,v 1.2 1998/10/07 03:40:51 gibbs Exp $
* $Id: ahc_pci.c,v 1.3 1998/12/07 21:58:45 archie Exp $
*/
#include <pci.h>
@ -138,7 +138,7 @@ static u_int8_t read_brdctl(struct ahc_softc *ahc);
static struct ahc_softc *first_398X;
static char* ahc_pci_probe(pcici_t tag, pcidi_t type);
static const char* ahc_pci_probe(pcici_t tag, pcidi_t type);
static void ahc_pci_attach(pcici_t config_id, int unit);
/* Exported for use in the ahc_intr routine */
@ -154,7 +154,7 @@ static struct pci_device ahc_pci_driver = {
DATA_SET (pcidevice_set, ahc_pci_driver);
static char*
static const char*
ahc_pci_probe (pcici_t tag, pcidi_t type)
{
switch (type) {

View File

@ -26,7 +26,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ide_pci.c,v 1.15 1998/12/04 21:41:18 archie Exp $
* $Id: ide_pci.c,v 1.16 1998/12/10 01:52:16 archie Exp $
*/
#include "pci.h"
@ -898,7 +898,7 @@ mkcookie(int iobase_wd,
return cp;
}
static char *
static const char *
ide_pci_probe(pcici_t tag, pcidi_t type)
{
u_long data;

View File

@ -1,5 +1,5 @@
/* $NetBSD: if_de.c,v 1.80 1998/09/25 18:06:53 matt Exp $ */
/* $Id: if_de.c,v 1.90 1998/11/06 02:13:13 peter Exp $ */
/* $Id: if_de.c,v 1.91 1998/11/28 00:25:32 msmith Exp $ */
/*-
* Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com)
@ -5310,7 +5310,7 @@ tulip_pci_shutdown(
}
#endif
static char*
static const char*
tulip_pci_probe(
pcici_t config_id,
pcidi_t device_id)

View File

@ -17,7 +17,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
* $Id: if_ed_p.c,v 1.12 1998/02/27 22:29:36 se Exp $
* $Id: if_ed_p.c,v 1.13 1998/03/17 10:54:23 danny Exp $
*/
#include "pci.h"
@ -51,7 +51,7 @@ static struct _pcsid
extern void *ed_attach_NE2000_pci __P((int, int));
static char* ed_pci_probe __P((pcici_t tag, pcidi_t type));
static const char* ed_pci_probe __P((pcici_t tag, pcidi_t type));
static void ed_pci_attach __P((pcici_t config_id, int unit));
static u_long ed_pci_count = NED;
@ -66,7 +66,7 @@ static struct pci_device ed_pci_driver = {
DATA_SET (pcidevice_set, ed_pci_driver);
static char*
static const char*
ed_pci_probe (pcici_t tag, pcidi_t type)
{
struct _pcsid *ep =pci_ids;

View File

@ -27,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: if_fxp.c,v 1.57 1998/10/11 06:28:54 dg Exp $
* $Id: if_fxp.c,v 1.58 1998/10/22 02:00:49 dg Exp $
*/
/*
@ -485,7 +485,7 @@ fxp_ether_ioctl(ifp, cmd, data)
#else /* __FreeBSD__ */
static u_long fxp_count;
static char *fxp_probe __P((pcici_t, pcidi_t));
static const char *fxp_probe __P((pcici_t, pcidi_t));
static void fxp_attach __P((pcici_t, int));
static void fxp_shutdown __P((int, void *));
@ -502,7 +502,7 @@ DATA_SET(pcidevice_set, fxp_device);
/*
* Return identification string if this is device is ours.
*/
static char *
static const char *
fxp_probe(config_id, device_id)
pcici_t config_id;
pcidi_t device_id;

View File

@ -47,7 +47,7 @@
#include <dev/vx/if_vxreg.h>
static void vx_pci_shutdown(int, void *);
static char *vx_pci_probe(pcici_t, pcidi_t);
static const char *vx_pci_probe(pcici_t, pcidi_t);
static void vx_pci_attach(pcici_t, int unit);
static void
@ -59,7 +59,7 @@ vx_pci_shutdown(
vxfree(sc);
}
static char*
static const char*
vx_pci_probe(
pcici_t config_id,
pcidi_t device_id)

View File

@ -1,6 +1,6 @@
/**************************************************************************
**
** $Id: ncr.c,v 1.138 1998/12/04 22:54:55 archie Exp $
** $Id: ncr.c,v 1.139 1998/12/07 21:58:47 archie Exp $
**
** Device driver for the NCR 53C8XX PCI-SCSI-Controller Family.
**
@ -1340,7 +1340,7 @@ static void ncr_action (struct cam_sim *sim, union ccb *ccb);
static void ncr_timeout (void *arg);
static void ncr_wakeup (ncb_p np, u_long code);
static char* ncr_probe (pcici_t tag, pcidi_t type);
static const char* ncr_probe (pcici_t tag, pcidi_t type);
static void ncr_attach (pcici_t tag, int unit);
#endif /* KERNEL */
@ -1357,7 +1357,7 @@ static void ncr_attach (pcici_t tag, int unit);
#if !defined(lint)
static const char ident[] =
"\n$Id: ncr.c,v 1.138 1998/12/04 22:54:55 archie Exp $\n";
"\n$Id: ncr.c,v 1.139 1998/12/07 21:58:47 archie Exp $\n";
#endif
static const u_long ncr_version = NCR_VERSION * 11
@ -3357,7 +3357,7 @@ static int ncr_chip_lookup(u_long device_id, u_char revision_id)
static char* ncr_probe (pcici_t tag, pcidi_t type)
static const char* ncr_probe (pcici_t tag, pcidi_t type)
{
u_char rev = pci_conf_read (tag, PCI_CLASS_REG) & 0xff;
int i;

View File

@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: pci_compat.c,v 1.15 1998/12/07 21:58:48 archie Exp $
* $Id: pci_compat.c,v 1.16 1998/12/09 01:27:29 eivind Exp $
*
*/
@ -345,9 +345,9 @@ pci_freeunit(pcicfgregs *cfg, char *name, int unit)
return (unit);
}
static char *drvname;
static const char *drvname;
static char*
static const char*
pci_probedrv(pcicfgregs *cfg, struct pci_device *dvp)
{
if (dvp && dvp->pd_probe) {

View File

@ -1,6 +1,6 @@
/**************************************************************************
**
** $Id: pcisupport.c,v 1.77 1998/12/07 21:58:48 archie Exp $
** $Id: pcisupport.c,v 1.78 1998/12/09 01:33:03 eivind Exp $
**
** Device driver for DEC/INTEL PCI chipsets.
**
@ -62,7 +62,7 @@
**---------------------------------------------------------
*/
static char* chipset_probe (pcici_t tag, pcidi_t type);
static const char* chipset_probe (pcici_t tag, pcidi_t type);
static void chipset_attach(pcici_t tag, int unit);
static u_long chipset_count;
@ -161,7 +161,7 @@ fixwsc_natoma(pcici_t tag)
}
static char*
static const char*
chipset_probe (pcici_t tag, pcidi_t type)
{
unsigned rev;
@ -845,7 +845,7 @@ chipset_attach (pcici_t config_id, int unit)
**---------------------------------------------------------
*/
static char* vga_probe (pcici_t tag, pcidi_t type);
static const char* vga_probe (pcici_t tag, pcidi_t type);
static void vga_attach (pcici_t tag, int unit);
static u_long vga_count;
@ -859,7 +859,7 @@ static struct pci_device vga_device = {
DATA_SET (pcidevice_set, vga_device);
static char* vga_probe (pcici_t tag, pcidi_t typea)
static const char* vga_probe (pcici_t tag, pcidi_t typea)
{
int data = pci_conf_read(tag, PCI_CLASS_REG);
u_int id = pci_conf_read(tag, PCI_ID_REG);
@ -1196,7 +1196,7 @@ static void vga_attach (pcici_t tag, int unit)
**---------------------------------------------------------
*/
static char* lkm_probe (pcici_t tag, pcidi_t type);
static const char* lkm_probe (pcici_t tag, pcidi_t type);
static void lkm_attach (pcici_t tag, int unit);
static u_long lkm_count;
@ -1210,7 +1210,7 @@ static struct pci_device lkm_device = {
DATA_SET (pcidevice_set, lkm_device);
static char*
static const char*
lkm_probe (pcici_t tag, pcidi_t type)
{
/*
@ -1231,7 +1231,7 @@ lkm_attach (pcici_t tag, int unit)
**---------------------------------------------------------
*/
static char* ign_probe (pcici_t tag, pcidi_t type);
static const char* ign_probe (pcici_t tag, pcidi_t type);
static void ign_attach (pcici_t tag, int unit);
static u_long ign_count;
@ -1245,7 +1245,7 @@ static struct pci_device ign_device = {
DATA_SET (pcidevice_set, ign_device);
static char*
static const char*
ign_probe (pcici_t tag, pcidi_t type)
{
switch (type) {

View File

@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: pcivar.h,v 1.21 1998/09/15 08:21:09 gibbs Exp $
* $Id: pcivar.h,v 1.22 1998/10/06 14:18:40 dfr Exp $
*
*/
@ -199,7 +199,7 @@ extern int pci_mechanism;
struct pci_device {
char* pd_name;
char* (*pd_probe ) (pcici_t tag, pcidi_t type);
const char* (*pd_probe ) (pcici_t tag, pcidi_t type);
void (*pd_attach) (pcici_t tag, int unit);
u_long *pd_count;
int (*pd_shutdown) (int, int);