From 35f069d08b51be1bccf4c57a22caeef766fae2de Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Mon, 14 Dec 1998 05:47:29 +0000 Subject: [PATCH] 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. --- sys/dev/aic7xxx/ahc_pci.c | 6 +++--- sys/dev/de/if_de.c | 4 ++-- sys/dev/ed/if_ed_pci.c | 6 +++--- sys/dev/fxp/if_fxp.c | 6 +++--- sys/dev/pci/pcivar.h | 4 ++-- sys/dev/vx/if_vx_pci.c | 4 ++-- sys/pci/ahc_pci.c | 6 +++--- sys/pci/ide_pci.c | 4 ++-- sys/pci/if_de.c | 4 ++-- sys/pci/if_ed_p.c | 6 +++--- sys/pci/if_fxp.c | 6 +++--- sys/pci/if_vx_pci.c | 4 ++-- sys/pci/ncr.c | 8 ++++---- sys/pci/pci_compat.c | 6 +++--- sys/pci/pcisupport.c | 18 +++++++++--------- sys/pci/pcivar.h | 4 ++-- 16 files changed, 48 insertions(+), 48 deletions(-) diff --git a/sys/dev/aic7xxx/ahc_pci.c b/sys/dev/aic7xxx/ahc_pci.c index 6c26c09a8ca1..fb53e9d107ea 100644 --- a/sys/dev/aic7xxx/ahc_pci.c +++ b/sys/dev/aic7xxx/ahc_pci.c @@ -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 @@ -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) { diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c index 2dce9a50c66d..0a1b599d8f3f 100644 --- a/sys/dev/de/if_de.c +++ b/sys/dev/de/if_de.c @@ -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) diff --git a/sys/dev/ed/if_ed_pci.c b/sys/dev/ed/if_ed_pci.c index d284ee6074e0..e14a96c50abd 100644 --- a/sys/dev/ed/if_ed_pci.c +++ b/sys/dev/ed/if_ed_pci.c @@ -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; diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index 1a1c1518fe13..1908cb6eff70 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -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; diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h index 13e9991eefc3..75f48a8bc6d8 100644 --- a/sys/dev/pci/pcivar.h +++ b/sys/dev/pci/pcivar.h @@ -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); diff --git a/sys/dev/vx/if_vx_pci.c b/sys/dev/vx/if_vx_pci.c index f4e98ac0a3ff..8eb3d7505e11 100644 --- a/sys/dev/vx/if_vx_pci.c +++ b/sys/dev/vx/if_vx_pci.c @@ -47,7 +47,7 @@ #include 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) diff --git a/sys/pci/ahc_pci.c b/sys/pci/ahc_pci.c index 6c26c09a8ca1..fb53e9d107ea 100644 --- a/sys/pci/ahc_pci.c +++ b/sys/pci/ahc_pci.c @@ -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 @@ -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) { diff --git a/sys/pci/ide_pci.c b/sys/pci/ide_pci.c index 70a457092987..e7dfcddd31a4 100644 --- a/sys/pci/ide_pci.c +++ b/sys/pci/ide_pci.c @@ -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; diff --git a/sys/pci/if_de.c b/sys/pci/if_de.c index 2dce9a50c66d..0a1b599d8f3f 100644 --- a/sys/pci/if_de.c +++ b/sys/pci/if_de.c @@ -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) diff --git a/sys/pci/if_ed_p.c b/sys/pci/if_ed_p.c index d284ee6074e0..e14a96c50abd 100644 --- a/sys/pci/if_ed_p.c +++ b/sys/pci/if_ed_p.c @@ -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; diff --git a/sys/pci/if_fxp.c b/sys/pci/if_fxp.c index 1a1c1518fe13..1908cb6eff70 100644 --- a/sys/pci/if_fxp.c +++ b/sys/pci/if_fxp.c @@ -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; diff --git a/sys/pci/if_vx_pci.c b/sys/pci/if_vx_pci.c index f4e98ac0a3ff..8eb3d7505e11 100644 --- a/sys/pci/if_vx_pci.c +++ b/sys/pci/if_vx_pci.c @@ -47,7 +47,7 @@ #include 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) diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c index f6a3a3984c4f..85e2d7d9c561 100644 --- a/sys/pci/ncr.c +++ b/sys/pci/ncr.c @@ -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; diff --git a/sys/pci/pci_compat.c b/sys/pci/pci_compat.c index 42bed11afc76..aa9e794ac731 100644 --- a/sys/pci/pci_compat.c +++ b/sys/pci/pci_compat.c @@ -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) { diff --git a/sys/pci/pcisupport.c b/sys/pci/pcisupport.c index f79cb8353fa6..5311b239d88e 100644 --- a/sys/pci/pcisupport.c +++ b/sys/pci/pcisupport.c @@ -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) { diff --git a/sys/pci/pcivar.h b/sys/pci/pcivar.h index 13e9991eefc3..75f48a8bc6d8 100644 --- a/sys/pci/pcivar.h +++ b/sys/pci/pcivar.h @@ -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);