constify the pcmcia/cardbus method tables

This commit is contained in:
drochner 2008-06-26 12:33:17 +00:00
parent c7f7a60802
commit cc29fcf8b9
7 changed files with 22 additions and 22 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cardbusvar.h,v 1.42 2008/06/25 11:42:32 drochner Exp $ */
/* $NetBSD: cardbusvar.h,v 1.43 2008/06/26 12:33:17 drochner Exp $ */
/*
* Copyright (c) 1998, 1999 and 2000
@ -83,7 +83,7 @@ typedef struct cardbus_chipset_tag *cardbus_chipset_tag_t;
* void (*cardbus_conf_write)(cardbus_chipset_tag_t ct,
* cardbustag_t tag, int offs, cardbusreg_t val);
*/
typedef struct cardbus_functions {
typedef const struct cardbus_functions {
int (*cardbus_space_alloc)(cardbus_chipset_tag_t, rbus_tag_t,
bus_addr_t, bus_size_t, bus_addr_t, bus_size_t,
int, bus_addr_t *, bus_space_handle_t *);
@ -105,7 +105,7 @@ typedef struct cardbus_functions {
#else
typedef struct cardbus_functions {
typedef const struct cardbus_functions {
int (*cardbus_ctrl)(cardbus_chipset_tag_t, int);
int (*cardbus_power)(cardbus_chipset_tag_t, int);
int (*cardbus_mem_open)(cardbus_chipset_tag_t, int, u_int32_t,

View File

@ -1,4 +1,4 @@
/* $NetBSD: i82365_isa.c,v 1.28 2007/10/19 12:00:16 ad Exp $ */
/* $NetBSD: i82365_isa.c,v 1.29 2008/06/26 12:33:17 drochner Exp $ */
/*
* Copyright (c) 1997 Marc Horowitz. All rights reserved.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: i82365_isa.c,v 1.28 2007/10/19 12:00:16 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: i82365_isa.c,v 1.29 2008/06/26 12:33:17 drochner Exp $");
#define PCICISADEBUG
@ -67,7 +67,7 @@ void pcic_isa_attach(struct device *, struct device *, void *);
CFATTACH_DECL(pcic_isa, sizeof(struct pcic_isa_softc),
pcic_isa_probe, pcic_isa_attach, NULL, NULL);
static struct pcmcia_chip_functions pcic_isa_functions = {
static const struct pcmcia_chip_functions pcic_isa_functions = {
pcic_chip_mem_alloc,
pcic_chip_mem_free,
pcic_chip_mem_map,

View File

@ -1,4 +1,4 @@
/* $NetBSD: tcic2_isa.c,v 1.20 2008/04/08 20:08:50 cegger Exp $ */
/* $NetBSD: tcic2_isa.c,v 1.21 2008/06/26 12:33:17 drochner Exp $ */
/*
*
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tcic2_isa.c,v 1.20 2008/04/08 20:08:50 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: tcic2_isa.c,v 1.21 2008/06/26 12:33:17 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -118,7 +118,7 @@ void tcic_isa_chip_intr_disestablish(pcmcia_chipset_handle_t, void *);
CFATTACH_DECL(tcic_isa, sizeof(struct tcic_softc),
tcic_isa_probe, tcic_isa_attach, NULL, NULL);
static struct pcmcia_chip_functions tcic_isa_functions = {
static const struct pcmcia_chip_functions tcic_isa_functions = {
tcic_chip_mem_alloc,
tcic_chip_mem_free,
tcic_chip_mem_map,

View File

@ -1,4 +1,4 @@
/* $NetBSD: i82365_isapnp.c,v 1.25 2008/04/08 20:09:27 cegger Exp $ */
/* $NetBSD: i82365_isapnp.c,v 1.26 2008/06/26 12:33:17 drochner Exp $ */
/*
* Copyright (c) 1998 Bill Sommerfeld. All rights reserved.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: i82365_isapnp.c,v 1.25 2008/04/08 20:09:27 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: i82365_isapnp.c,v 1.26 2008/06/26 12:33:17 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -71,7 +71,7 @@ void pcic_isapnp_attach(struct device *, struct device *, void *);
CFATTACH_DECL(pcic_isapnp, sizeof(struct pcic_isa_softc),
pcic_isapnp_match, pcic_isapnp_attach, NULL, NULL);
static struct pcmcia_chip_functions pcic_isa_functions = {
static const struct pcmcia_chip_functions pcic_isa_functions = {
pcic_chip_mem_alloc,
pcic_chip_mem_free,
pcic_chip_mem_map,

View File

@ -1,4 +1,4 @@
/* $NetBSD: i82365_pci.c,v 1.25 2008/04/10 19:13:36 cegger Exp $ */
/* $NetBSD: i82365_pci.c,v 1.26 2008/06/26 12:33:17 drochner Exp $ */
/*
* Copyright (c) 1997 Marc Horowitz. All rights reserved.
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: i82365_pci.c,v 1.25 2008/04/10 19:13:36 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: i82365_pci.c,v 1.26 2008/06/26 12:33:17 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -63,7 +63,7 @@ void pcic_pci_attach(struct device *, struct device *, void *);
CFATTACH_DECL(pcic_pci, sizeof(struct pcic_pci_softc),
pcic_pci_match, pcic_pci_attach, NULL, NULL);
static struct pcmcia_chip_functions pcic_pci_functions = {
static const struct pcmcia_chip_functions pcic_pci_functions = {
pcic_chip_mem_alloc,
pcic_chip_mem_free,
pcic_chip_mem_map,

View File

@ -1,4 +1,4 @@
/* $NetBSD: pccbb.c,v 1.173 2008/06/25 15:29:23 drochner Exp $ */
/* $NetBSD: pccbb.c,v 1.174 2008/06/26 12:33:17 drochner Exp $ */
/*
* Copyright (c) 1998, 1999 and 2000
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pccbb.c,v 1.173 2008/06/25 15:29:23 drochner Exp $");
__KERNEL_RCSID(0, "$NetBSD: pccbb.c,v 1.174 2008/06/26 12:33:17 drochner Exp $");
/*
#define CBB_DEBUG
@ -228,7 +228,7 @@ static void cb_show_regs(pci_chipset_tag_t pc, pcitag_t tag,
CFATTACH_DECL_NEW(cbb_pci, sizeof(struct pccbb_softc),
pcicbbmatch, pccbbattach, pccbbdetach, NULL);
static struct pcmcia_chip_functions pccbb_pcmcia_funcs = {
static const struct pcmcia_chip_functions pccbb_pcmcia_funcs = {
pccbb_pcmcia_mem_alloc,
pccbb_pcmcia_mem_free,
pccbb_pcmcia_mem_map,
@ -246,7 +246,7 @@ static struct pcmcia_chip_functions pccbb_pcmcia_funcs = {
};
#if rbus
static struct cardbus_functions pccbb_funcs = {
static const struct cardbus_functions pccbb_funcs = {
pccbb_rbus_cb_space_alloc,
pccbb_rbus_cb_space_free,
pccbb_cb_intr_establish,
@ -259,7 +259,7 @@ static struct cardbus_functions pccbb_funcs = {
pccbb_conf_write,
};
#else
static struct cardbus_functions pccbb_funcs = {
static const struct cardbus_functions pccbb_funcs = {
pccbb_ctrl,
pccbb_power_ct,
pccbb_mem_open,

View File

@ -1,4 +1,4 @@
/* $NetBSD: pcmciachip.h,v 1.14 2007/10/19 12:01:06 ad Exp $ */
/* $NetBSD: pcmciachip.h,v 1.15 2008/06/26 12:33:18 drochner Exp $ */
/*
* Copyright (c) 1997 Marc Horowitz. All rights reserved.
@ -40,7 +40,7 @@ struct pcmcia_io_handle;
/* interfaces for pcmcia to call the chipset */
typedef struct pcmcia_chip_functions *pcmcia_chipset_tag_t;
typedef const struct pcmcia_chip_functions *pcmcia_chipset_tag_t;
typedef void *pcmcia_chipset_handle_t;
typedef int pcmcia_mem_handle_t;