summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorjdolecek <jdolecek@NetBSD.org>2001-01-18 20:28:15 +0000
committerjdolecek <jdolecek@NetBSD.org>2001-01-18 20:28:15 +0000
commit34c8ae80dab7dff7ee69b219c6bf49ca6e84e73f (patch)
tree625354b477ae0db6bb663fa25ffc8be7214a49a0 /sys/dev/ic
parente912e655e179f7c8dd5317da1faff48b8b02cf8e (diff)
constify
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/ac97.c42
-rw-r--r--sys/dev/ic/ad1848.c10
-rw-r--r--sys/dev/ic/advmcode.c8
-rw-r--r--sys/dev/ic/advmcode.h8
-rw-r--r--sys/dev/ic/adwmcode.h4
-rw-r--r--sys/dev/ic/aic7xxx.c44
-rw-r--r--sys/dev/ic/aic7xxxvar.h4
-rw-r--r--sys/dev/ic/awi_wep.c8
-rw-r--r--sys/dev/ic/awivar.h4
-rw-r--r--sys/dev/ic/opl.c10
-rw-r--r--sys/dev/ic/oplinstrs.c6
-rw-r--r--sys/dev/ic/oplvar.h8
-rw-r--r--sys/dev/ic/pcdisplay_chars.c8
-rw-r--r--sys/dev/ic/vga.c20
14 files changed, 92 insertions, 92 deletions
diff --git a/sys/dev/ic/ac97.c b/sys/dev/ic/ac97.c
index 4e5d1b0f8ce..38d636a5666 100644
--- a/sys/dev/ic/ac97.c
+++ b/sys/dev/ic/ac97.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ac97.c,v 1.17 2001/01/09 23:14:25 rh Exp $ */
+/* $NetBSD: ac97.c,v 1.18 2001/01/18 20:28:16 jdolecek Exp $ */
/* $OpenBSD: ac97.c,v 1.8 2000/07/19 09:01:35 csapuntz Exp $ */
/*
@@ -74,24 +74,24 @@
#include <dev/ic/ac97reg.h>
#include <dev/ic/ac97var.h>
-static struct audio_mixer_enum ac97_on_off = { 2,
+static const struct audio_mixer_enum ac97_on_off = { 2,
{ { { AudioNoff } , 0 },
{ { AudioNon } , 1 } }};
-static struct audio_mixer_enum ac97_mic_select = { 2,
+static const struct audio_mixer_enum ac97_mic_select = { 2,
{ { { AudioNmicrophone "0" },
0 },
{ { AudioNmicrophone "1" },
1 } }};
-static struct audio_mixer_enum ac97_mono_select = { 2,
+static const struct audio_mixer_enum ac97_mono_select = { 2,
{ { { AudioNmixerout },
0 },
{ { AudioNmicrophone },
1 } }};
-static struct audio_mixer_enum ac97_source = { 8,
+static const struct audio_mixer_enum ac97_source = { 8,
{ { { AudioNmicrophone } , 0 },
{ { AudioNcd }, 1 },
{ { "video" }, 2 },
@@ -101,22 +101,22 @@ static struct audio_mixer_enum ac97_source = { 8,
{ { AudioNmixerout AudioNmono }, 6 },
{ { "phone" }, 7 }}};
-static struct audio_mixer_value ac97_volume_stereo = { { AudioNvolume },
+static const struct audio_mixer_value ac97_volume_stereo = { { AudioNvolume },
2 };
-static struct audio_mixer_value ac97_volume_mono = { { AudioNvolume },
+static const struct audio_mixer_value ac97_volume_mono = { { AudioNvolume },
1 };
#define WRAP(a) &a, sizeof(a)
-struct ac97_source_info {
- char *class;
- char *device;
- char *qualifier;
+const struct ac97_source_info {
+ const char *class;
+ const char *device;
+ const char *qualifier;
int type;
- void *info;
+ const void *info;
int info_size;
u_int8_t reg;
@@ -314,7 +314,7 @@ static const struct ac97_codecid {
{ 0, NULL, }
};
-static const char *ac97enhancement[] = {
+static const char * const ac97enhancement[] = {
"no 3D stereo",
"Analog Devices Phat Stereo",
"Creative"
@@ -349,7 +349,7 @@ static const char *ac97enhancement[] = {
"Unknown 3D",
};
-static const char *ac97feature[] = {
+static const char * const ac97feature[] = {
"mic channel",
"reserved",
"tone",
@@ -363,7 +363,7 @@ static const char *ac97feature[] = {
};
-int ac97_str_equal __P((char *, char *));
+int ac97_str_equal __P((const char *, const char *));
void ac97_setup_source_info __P((struct ac97_softc *));
void ac97_read __P((struct ac97_softc *, u_int8_t, u_int16_t *));
void ac97_setup_defaults __P((struct ac97_softc *));
@@ -421,7 +421,7 @@ ac97_setup_defaults(as)
struct ac97_softc *as;
{
int idx;
- struct ac97_source_info *si;
+ const struct ac97_source_info *si;
memset(as->shadow_reg, 0, sizeof(as->shadow_reg));
@@ -437,7 +437,7 @@ ac97_restore_shadow(self)
{
struct ac97_softc *as = (struct ac97_softc *) self;
int idx;
- struct ac97_source_info *si;
+ const struct ac97_source_info *si;
for (idx = 0; idx < SOURCE_INFO_SIZE; idx++) {
si = &source_info[idx];
@@ -447,7 +447,7 @@ ac97_restore_shadow(self)
int
ac97_str_equal(a, b)
- char *a, *b;
+ const char *a, *b;
{
return ((a == b) || (a && b && (!strcmp(a, b))));
}
@@ -656,7 +656,7 @@ ac97_query_devinfo(codec_if, dip)
if (dip->index < as->num_source_info) {
struct ac97_source_info *si = &as->source_info[dip->index];
- char *name;
+ const char *name;
dip->type = si->type;
dip->mixer_class = si->mixer_class;
@@ -720,7 +720,7 @@ ac97_mixer_set_port(codec_if, cp)
break;
case AUDIO_MIXER_VALUE:
{
- struct audio_mixer_value *value = si->info;
+ const struct audio_mixer_value *value = si->info;
u_int16_t l, r;
if ((cp->un.value.num_channels <= 0) ||
@@ -816,7 +816,7 @@ ac97_mixer_get_port(codec_if, cp)
break;
case AUDIO_MIXER_VALUE:
{
- struct audio_mixer_value *value = si->info;
+ const struct audio_mixer_value *value = si->info;
u_int16_t l, r;
if ((cp->un.value.num_channels <= 0) ||
diff --git a/sys/dev/ic/ad1848.c b/sys/dev/ic/ad1848.c
index 9700a4f1ed3..e4601c41784 100644
--- a/sys/dev/ic/ad1848.c
+++ b/sys/dev/ic/ad1848.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ad1848.c,v 1.9 1999/11/01 18:12:19 augustss Exp $ */
+/* $NetBSD: ad1848.c,v 1.10 2001/01/18 20:28:17 jdolecek Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -136,7 +136,7 @@ int ad1848debug = 0;
/*
* Initial values for the indirect registers of CS4248/AD1848.
*/
-static int ad1848_init_values[] = {
+static const int ad1848_init_values[] = {
GAIN_12|INPUT_MIC_GAIN_ENABLE, /* Left Input Control */
GAIN_12|INPUT_MIC_GAIN_ENABLE, /* Right Input Control */
ATTEN_12, /* Left Aux #1 Input Control */
@@ -432,7 +432,7 @@ ad1848_attach(sc)
/*
* Various routines to interface to higher level audio driver
*/
-struct ad1848_mixerinfo {
+const struct ad1848_mixerinfo {
int left_reg;
int right_reg;
int atten_bits;
@@ -507,7 +507,7 @@ ad1848_set_channel_gain(sc, device, gp)
int device;
struct ad1848_volume *gp;
{
- struct ad1848_mixerinfo *info = &mixer_channel_info[device];
+ const struct ad1848_mixerinfo *info = &mixer_channel_info[device];
u_char reg;
u_int atten;
@@ -1207,7 +1207,7 @@ ad1848_set_speed(sc, argp)
} speed_struct;
u_long arg = *argp;
- static speed_struct speed_table[] = {
+ static const speed_struct speed_table[] = {
{5510, (0 << 1) | 1},
{5510, (0 << 1) | 1},
{6620, (7 << 1) | 1},
diff --git a/sys/dev/ic/advmcode.c b/sys/dev/ic/advmcode.c
index 35d6c4caf0a..7b2eb3bcecd 100644
--- a/sys/dev/ic/advmcode.c
+++ b/sys/dev/ic/advmcode.c
@@ -1,4 +1,4 @@
-/* $NetBSD: advmcode.c,v 1.3 1998/09/26 16:02:57 dante Exp $ */
+/* $NetBSD: advmcode.c,v 1.4 2001/01/18 20:28:17 jdolecek Exp $ */
/*
* Generic driver definitions and exported functions for the Advanced
@@ -62,7 +62,7 @@
* This code is loaded into Lram during initializzation procedure.
*/
-u_int8_t asc_mcode[] =
+const u_int8_t asc_mcode[] =
{
0x01, 0x03, 0x01, 0x19, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -210,11 +210,11 @@ u_int8_t asc_mcode[] =
0x41, 0x23, 0xF6, 0x88, 0x11, 0x23, 0xA1, 0x01, 0x04, 0x23, 0xA0, 0x01, 0xE6, 0x84,
};
-u_int16_t asc_mcode_size = sizeof(asc_mcode);
+const u_int16_t asc_mcode_size = sizeof(asc_mcode);
/*
* This checksum is used to compare with that one that will be calculated
* at run time.
* This is performed to ensure the uCode is correctly loaded into the Lram.
*/
-u_int32_t asc_mcode_chksum = 0x012B5442UL;
+const u_int32_t asc_mcode_chksum = 0x012B5442UL;
diff --git a/sys/dev/ic/advmcode.h b/sys/dev/ic/advmcode.h
index 1e213f6fbac..e58303969df 100644
--- a/sys/dev/ic/advmcode.h
+++ b/sys/dev/ic/advmcode.h
@@ -1,4 +1,4 @@
-/* $NetBSD: advmcode.h,v 1.3 1998/09/26 16:02:57 dante Exp $ */
+/* $NetBSD: advmcode.h,v 1.4 2001/01/18 20:28:17 jdolecek Exp $ */
/*
* Generic driver definitions and exported functions for the Advanced
@@ -41,8 +41,8 @@
#ifndef ADV_MCODE_H
#define ADV_MCODE_H
-extern u_int8_t asc_mcode[];
-extern u_int16_t asc_mcode_size;
-extern u_int32_t asc_mcode_chksum;
+extern const u_int8_t asc_mcode[];
+extern const u_int16_t asc_mcode_size;
+extern const u_int32_t asc_mcode_chksum;
#endif /* ADV_MCODE_H */
diff --git a/sys/dev/ic/adwmcode.h b/sys/dev/ic/adwmcode.h
index f6f3e8f54b8..e0a5cb59a41 100644
--- a/sys/dev/ic/adwmcode.h
+++ b/sys/dev/ic/adwmcode.h
@@ -1,4 +1,4 @@
-/* $NetBSD: adwmcode.h,v 1.5 2000/05/27 18:24:51 dante Exp $ */
+/* $NetBSD: adwmcode.h,v 1.6 2001/01/18 20:28:17 jdolecek Exp $ */
/*
* Generic driver definitions and exported functions for the Advanced
@@ -97,7 +97,7 @@ typedef struct adw_carrier ADW_CARRIER;
/******************************************************************************/
struct adw_mcode {
- const u_int8_t *mcode_data;
+ const u_int8_t * const mcode_data;
const u_int32_t mcode_chksum;
const u_int16_t mcode_size;
};
diff --git a/sys/dev/ic/aic7xxx.c b/sys/dev/ic/aic7xxx.c
index a9359927a3b..58b21540a27 100644
--- a/sys/dev/ic/aic7xxx.c
+++ b/sys/dev/ic/aic7xxx.c
@@ -1,4 +1,4 @@
-/* $NetBSD: aic7xxx.c,v 1.62 2000/12/02 14:53:01 fvdl Exp $ */
+/* $NetBSD: aic7xxx.c,v 1.63 2001/01/18 20:28:16 jdolecek Exp $ */
/*
* Generic driver for the aic7xxx based adaptec SCSI controllers
@@ -150,7 +150,7 @@
| (SIM_IS_SCSIBUS_B((ahc), (xs)->sc_link) ? SELBUSB : 0) \
| ((xs)->sc_link->scsipi_scsi.lun & 0x07))
-char *ahc_chip_names[] =
+const char * const ahc_chip_names[] =
{
"NONE",
"aic7770",
@@ -268,20 +268,20 @@ static u_int ahc_rem_scb_from_disc_list(struct ahc_softc *, u_int, u_int);
static void ahc_add_curscb_to_free_list(struct ahc_softc *);
static void ahc_clear_intstat(struct ahc_softc *);
static void ahc_reset_current_bus(struct ahc_softc *);
-static struct ahc_syncrate *
+static const struct ahc_syncrate *
ahc_devlimited_syncrate(struct ahc_softc *, u_int *);
-static struct ahc_syncrate *
+static const struct ahc_syncrate *
ahc_find_syncrate(struct ahc_softc *, u_int *, u_int);
static u_int ahc_find_period(struct ahc_softc *, u_int, u_int);
-static void ahc_validate_offset(struct ahc_softc *, struct ahc_syncrate *,
- u_int *, int);
+static void ahc_validate_offset(struct ahc_softc *,
+ const struct ahc_syncrate *, u_int *, int);
static void ahc_update_target_msg_request(struct ahc_softc *,
struct ahc_devinfo *,
struct ahc_initiator_tinfo *,
int, int);
static void ahc_set_syncrate(struct ahc_softc *, struct ahc_devinfo *,
- struct ahc_syncrate *, u_int, u_int, u_int,
- int, int);
+ const struct ahc_syncrate *, u_int, u_int,
+ u_int, int, int);
static void ahc_set_width(struct ahc_softc *, struct ahc_devinfo *,
u_int, u_int, int, int);
static void ahc_set_tags(struct ahc_softc *, struct ahc_devinfo *,
@@ -777,9 +777,9 @@ ahc_print_scb(struct scb *scb)
}
#endif
-static struct {
+static const struct {
u_int8_t errno;
- char *errmesg;
+ const char *errmesg;
} hard_error[] = {
{ ILLHADDR, "Illegal Host Access" },
{ ILLSADDR, "Illegal Sequencer Address referrenced" },
@@ -792,10 +792,10 @@ static struct {
};
static const int num_errors = sizeof(hard_error)/sizeof(hard_error[0]);
-static struct {
+static const struct {
u_int8_t phase;
u_int8_t mesg_out; /* Message response to parity errors */
- char *phasemsg;
+ const char *phasemsg;
} phase_table[] = {
{ P_DATAOUT, MSG_NOOP, "in Data-out phase" },
{ P_DATAIN, MSG_INITIATOR_DET_ERR, "in Data-in phase" },
@@ -817,7 +817,7 @@ static const int num_phases = (sizeof(phase_table)/sizeof(phase_table[0])) - 1;
#define AHC_SYNCRATE_ULTRA2 1
#define AHC_SYNCRATE_ULTRA 3
#define AHC_SYNCRATE_FAST 6
-static struct ahc_syncrate ahc_syncrates[] = {
+static const struct ahc_syncrate ahc_syncrates[] = {
/* ultra2 fast/ultra period rate */
{ 0x42, 0x000, 9, "80.0" },
{ 0x03, 0x000, 10, "40.0" },
@@ -1081,7 +1081,7 @@ ahc_reset(struct ahc_softc *ahc)
* this function finds the nearest syncrate to the input period limited
* by the capabilities of the bus connectivity of the target.
*/
-static struct ahc_syncrate *
+static const struct ahc_syncrate *
ahc_devlimited_syncrate(struct ahc_softc *ahc, u_int *period) {
u_int maxsync;
@@ -1105,10 +1105,10 @@ ahc_devlimited_syncrate(struct ahc_softc *ahc, u_int *period) {
* Return the period and offset that should be sent to the target
* if this was the beginning of an SDTR.
*/
-static struct ahc_syncrate *
+static const struct ahc_syncrate *
ahc_find_syncrate(struct ahc_softc *ahc, u_int *period, u_int maxsync)
{
- struct ahc_syncrate *syncrate;
+ const struct ahc_syncrate *syncrate;
syncrate = &ahc_syncrates[maxsync];
while ((syncrate->rate != NULL)
@@ -1148,7 +1148,7 @@ ahc_find_syncrate(struct ahc_softc *ahc, u_int *period, u_int maxsync)
static u_int
ahc_find_period(struct ahc_softc *ahc, u_int scsirate, u_int maxsync)
{
- struct ahc_syncrate *syncrate;
+ const struct ahc_syncrate *syncrate;
if ((ahc->features & AHC_ULTRA2) != 0)
scsirate &= SXFR_ULTRA2;
@@ -1172,7 +1172,7 @@ ahc_find_period(struct ahc_softc *ahc, u_int scsirate, u_int maxsync)
}
static void
-ahc_validate_offset(struct ahc_softc *ahc, struct ahc_syncrate *syncrate,
+ahc_validate_offset(struct ahc_softc *ahc, const struct ahc_syncrate *syncrate,
u_int *offset, int wide)
{
u_int maxoffset;
@@ -1240,7 +1240,7 @@ ahc_update_target_msg_request(struct ahc_softc *ahc,
static void
ahc_set_syncrate(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
- struct ahc_syncrate *syncrate,
+ const struct ahc_syncrate *syncrate,
u_int period, u_int offset, u_int type, int paused, int done)
{
struct ahc_initiator_tinfo *tinfo;
@@ -2403,7 +2403,7 @@ ahc_build_transfer_msg(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
if (dowide) {
ahc_construct_wdtr(ahc, tinfo->goal.width);
} else if (dosync) {
- struct ahc_syncrate *rate;
+ const struct ahc_syncrate *rate;
u_int period;
u_int offset;
@@ -2962,7 +2962,7 @@ ahc_parse_msg(struct ahc_softc *ahc, struct scsipi_link *sc_link,
switch (ahc->msgin_buf[2]) {
case MSG_EXT_SDTR:
{
- struct ahc_syncrate *syncrate;
+ const struct ahc_syncrate *syncrate;
u_int period;
u_int offset;
u_int saved_offset;
@@ -3098,7 +3098,7 @@ ahc_parse_msg(struct ahc_softc *ahc, struct scsipi_link *sc_link,
if (sending_reply == FALSE && reject == FALSE) {
if (tinfo->goal.period) {
- struct ahc_syncrate *rate;
+ const struct ahc_syncrate *rate;
u_int period;
u_int offset;
diff --git a/sys/dev/ic/aic7xxxvar.h b/sys/dev/ic/aic7xxxvar.h
index d04dc8e0147..cd20f9fdd92 100644
--- a/sys/dev/ic/aic7xxxvar.h
+++ b/sys/dev/ic/aic7xxxvar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: aic7xxxvar.h,v 1.24 2000/05/27 21:58:15 fvdl Exp $ */
+/* $NetBSD: aic7xxxvar.h,v 1.25 2001/01/18 20:28:17 jdolecek Exp $ */
/*
* Interface to the generic driver for the aic7xxx based adaptec
@@ -116,7 +116,7 @@ typedef enum {
AHC_BUS_MASK = 0x0F00
} ahc_chip;
-extern char *ahc_chip_names[];
+extern const char * const ahc_chip_names[];
typedef enum {
AHC_FENONE = 0x0000,
diff --git a/sys/dev/ic/awi_wep.c b/sys/dev/ic/awi_wep.c
index 6e2148cfa7f..57da5f68dd7 100644
--- a/sys/dev/ic/awi_wep.c
+++ b/sys/dev/ic/awi_wep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: awi_wep.c,v 1.4 2000/08/14 11:28:03 onoe Exp $ */
+/* $NetBSD: awi_wep.c,v 1.5 2001/01/18 20:28:18 jdolecek Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -125,7 +125,7 @@ static void awi_null_copy __P((void *ctx, u_int8_t *dst, u_int8_t *src, int len)
/* XXX: the order should be known to wiconfig/user */
-static struct awi_wep_algo awi_wep_algo[] = {
+static const struct awi_wep_algo awi_wep_algo[] = {
/* 0: no wep */
{ "no" }, /* dummy for no wep */
@@ -232,7 +232,7 @@ awi_wep_setalgo(sc, algo)
struct awi_softc *sc;
int algo;
{
- struct awi_wep_algo *awa;
+ const struct awi_wep_algo *awa;
int ctxlen;
awi_crc_init(); /* XXX: not belongs here */
@@ -303,7 +303,7 @@ awi_wep_encrypt(sc, m0, txflag)
{
struct mbuf *m, *n, *n0;
struct ieee80211_frame *wh;
- struct awi_wep_algo *awa;
+ const struct awi_wep_algo *awa;
int left, len, moff, noff, keylen, kid;
u_int32_t iv, crc;
u_int8_t *key, *ivp;
diff --git a/sys/dev/ic/awivar.h b/sys/dev/ic/awivar.h
index 517728a60b3..3e68e82fb74 100644
--- a/sys/dev/ic/awivar.h
+++ b/sys/dev/ic/awivar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: awivar.h,v 1.12 2000/07/21 04:48:56 onoe Exp $ */
+/* $NetBSD: awivar.h,v 1.13 2001/01/18 20:28:17 jdolecek Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -152,7 +152,7 @@ struct awi_softc
u_int8_t sc_wep_key[IEEE80211_WEP_NKID][AWI_MAX_KEYLEN];
int sc_wep_defkid;
void *sc_wep_ctx; /* work area */
- struct awi_wep_algo *sc_wep_algo;
+ const struct awi_wep_algo *sc_wep_algo;
u_char sc_banner[AWI_BANNER_LEN];
struct awi_mib_local sc_mib_local;
diff --git a/sys/dev/ic/opl.c b/sys/dev/ic/opl.c
index 458f862cc7f..c83f58a755b 100644
--- a/sys/dev/ic/opl.c
+++ b/sys/dev/ic/opl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: opl.c,v 1.11 2000/08/12 22:24:26 augustss Exp $ */
+/* $NetBSD: opl.c,v 1.12 2001/01/18 20:28:18 jdolecek Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@ struct real_voice {
u_int8_t op[4]; /* Operator offsets */
};
-struct opl_voice voicetab[] = {
+const struct opl_voice voicetab[] = {
/* No I/O offs OP1 OP2 OP3 OP4 */
/* --------------------------------------------- */
{ 0, OPL_L, {0x00, 0x03, 0x08, 0x0b}},
@@ -275,7 +275,7 @@ opl_load_patch(sc, v)
struct opl_softc *sc;
int v;
{
- struct opl_operators *p = sc->voices[v].patch;
+ const struct opl_operators *p = sc->voices[v].patch;
opl_set_op_reg(sc, OPL_AM_VIB, v, 0, p->ops[OO_CHARS+0]);
opl_set_op_reg(sc, OPL_AM_VIB, v, 1, p->ops[OO_CHARS+1]);
@@ -390,7 +390,7 @@ oplsyn_reset(addr)
opl_reset(sc);
}
-int8_t opl_volume_table[128] =
+const int8_t opl_volume_table[128] =
{-64, -48, -40, -35, -32, -29, -27, -26,
-24, -23, -21, -20, -19, -18, -18, -17,
-16, -15, -15, -14, -13, -13, -12, -12,
@@ -439,7 +439,7 @@ oplsyn_noteon(ms, voice, freq, vel)
{
struct opl_softc *sc = ms->data;
struct opl_voice *v;
- struct opl_operators *p;
+ const struct opl_operators *p;
u_int32_t block_fnum;
int mult;
int c_mult, m_mult;
diff --git a/sys/dev/ic/oplinstrs.c b/sys/dev/ic/oplinstrs.c
index 7e189393f01..0fc1107bcec 100644
--- a/sys/dev/ic/oplinstrs.c
+++ b/sys/dev/ic/oplinstrs.c
@@ -1,4 +1,4 @@
-/* $NetBSD: oplinstrs.c,v 1.2 1999/02/15 04:54:35 hubertf Exp $ */
+/* $NetBSD: oplinstrs.c,v 1.3 2001/01/18 20:28:18 jdolecek Exp $ */
#include <sys/param.h>
#include <sys/systm.h>
@@ -20,7 +20,7 @@
* Operator settings for the OPL2 and OPL3 FM synths.
* These tables are indexed by the General MIDI instrument number.
*/
-struct opl_operators opl3_instrs[OPL_NINSTR] = {
+const struct opl_operators opl3_instrs[OPL_NINSTR] = {
{ 1, { 0x23, 0x01, 0x15, 0x00, 0xfd, 0x84, 0x7c, 0xf5, 0x03, 0x00, 0x10,
0x03, 0x01, 0x5d, 0x00, 0xf2, 0xf4, 0x35, 0xf5, 0x00, 0x04, 0x11, } },
{ 1, { 0x03, 0x01, 0x7d, 0x00, 0xf3, 0xf3, 0xf5, 0xf5, 0x00, 0x04, 0x10,
@@ -322,7 +322,7 @@ struct opl_operators opl3_instrs[OPL_NINSTR] = {
{ 0, { 0x3c, 0x31, 0x90, 0x00, 0x73, 0xc4, 0xb1, 0xf3, 0x00, 0x00, 0x2a, } },
};
-struct opl_operators opl2_instrs[OPL_NINSTR] = {
+const struct opl_operators opl2_instrs[OPL_NINSTR] = {
{ 0, { 0x01, 0x10, 0x1b, 0x00, 0xc3, 0x92, 0x23, 0x62, 0x02, 0x01, 0x1e, } },
{ 0, { 0x03, 0x01, 0x7d, 0x00, 0xf3, 0xf3, 0xf5, 0xf5, 0x00, 0x04, 0x30, } },
{ 0, { 0x03, 0x01, 0x61, 0x00, 0xfb, 0xf5, 0xf5, 0xf5, 0x04, 0x04, 0x30, } },
diff --git a/sys/dev/ic/oplvar.h b/sys/dev/ic/oplvar.h
index 75082cb21b6..e4dfec6be11 100644
--- a/sys/dev/ic/oplvar.h
+++ b/sys/dev/ic/oplvar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: oplvar.h,v 1.4 1999/10/05 03:29:22 itohy Exp $ */
+/* $NetBSD: oplvar.h,v 1.5 2001/01/18 20:28:18 jdolecek Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@ struct opl_voice {
int voiceno;
int iooffs;
u_int8_t op[4];
- struct opl_operators *patch;
+ const struct opl_operators *patch;
u_int8_t rB0;
};
@@ -91,8 +91,8 @@ struct opl_operators {
#define OPL_NINSTR 256
#ifdef _KERNEL
-extern struct opl_operators opl2_instrs[];
-extern struct opl_operators opl3_instrs[];
+extern const struct opl_operators opl2_instrs[];
+extern const struct opl_operators opl3_instrs[];
int opl_find __P((struct opl_softc *));
void opl_attach __P((struct opl_softc *));
diff --git a/sys/dev/ic/pcdisplay_chars.c b/sys/dev/ic/pcdisplay_chars.c
index eda678b548f..407d0091b28 100644
--- a/sys/dev/ic/pcdisplay_chars.c
+++ b/sys/dev/ic/pcdisplay_chars.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pcdisplay_chars.c,v 1.5 2000/06/08 07:01:19 cgd Exp $ */
+/* $NetBSD: pcdisplay_chars.c,v 1.6 2001/01/18 20:28:17 jdolecek Exp $ */
/*
* Copyright (c) 1998
@@ -45,7 +45,7 @@
#define CONTROL 1 /* XXX smiley */
#define NOTPRINTABLE 4 /* diamond XXX watch out - not in ISO part! */
-static u_char isomappings[128] = {
+static const u_char isomappings[128] = {
CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL,
CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL,
CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL,
@@ -148,7 +148,7 @@ static u_char isomappings[128] = {
0x98, /* 0x00ff LATIN SMALL LETTER Y WITH DIAERESIS */
};
-static struct {
+static const struct {
u_int16_t uni;
u_char ibm;
} unimappings[] = {
@@ -262,7 +262,7 @@ static struct {
{0x266b, 0x0e}, /* BEAMED EIGHTH NOTES */
};
-static struct {
+static const struct {
u_int16_t uni;
u_char ibm;
int quality;
diff --git a/sys/dev/ic/vga.c b/sys/dev/ic/vga.c
index c3a42807716..178026174fc 100644
--- a/sys/dev/ic/vga.c
+++ b/sys/dev/ic/vga.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vga.c,v 1.34 2000/09/15 14:13:01 drochner Exp $ */
+/* $NetBSD: vga.c,v 1.35 2001/01/18 20:28:17 jdolecek Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -49,7 +49,7 @@
#include "opt_wsdisplay_compat.h" /* for WSCONS_SUPPORT_PCVTFONTS */
-static struct vgafont {
+static const struct vgafont {
char name[16];
int height;
int encoding;
@@ -75,7 +75,7 @@ struct vgascreen {
struct vga_config *cfg;
/* videostate */
- struct vgafont *fontset1, *fontset2;
+ const struct vgafont *fontset1, *fontset2;
/* font data */
/* palette */
@@ -95,7 +95,7 @@ struct vga_config {
bus_space_tag_t vc_biostag;
bus_space_handle_t vc_bioshdl;
- struct vgafont *vc_fonts[8];
+ const struct vgafont *vc_fonts[8];
struct vgascreen *wantedscreen;
void (*switchcb) __P((void *, int, int));
@@ -137,7 +137,7 @@ const struct wsdisplay_emulops vga_emulops = {
/*
* translate WS(=ANSI) color codes to standard pc ones
*/
-static unsigned char fgansitopc[] = {
+static const unsigned char fgansitopc[] = {
#ifdef __alpha__
/*
* XXX DEC HAS SWITCHED THE CODES FOR BLUE AND RED!!!
@@ -358,13 +358,13 @@ vga_selectfont(vc, scr, name1, name2)
char *name1, *name2; /* NULL: take first found */
{
const struct wsscreen_descr *type = scr->pcs.type;
- struct vgafont *f1, *f2;
+ const struct vgafont *f1, *f2;
int i;
f1 = f2 = 0;
for (i = 0; i < 8; i++) {
- struct vgafont *f = vc->vc_fonts[i];
+ const struct vgafont *f = vc->vc_fonts[i];
if (!f || f->height != type->fontheight)
continue;
if (!f1 &&
@@ -994,7 +994,7 @@ vga_copyrows(id, srcrow, dstrow, nrows)
#ifdef WSCONS_SUPPORT_PCVTFONTS
#define NOTYET 0xffff
-static u_int16_t pcvt_unichars[0xa0] = {
+static const u_int16_t pcvt_unichars[0xa0] = {
/* 0 */ _e006U,
NOTYET, NOTYET, NOTYET, NOTYET, NOTYET, NOTYET, NOTYET,
NOTYET,
@@ -1153,12 +1153,12 @@ vga_iso7_mapchar(int uni, unsigned int *index)
#endif /* WSCONS_SUPPORT_ISO7FONTS */
-static int _vga_mapchar __P((void *, struct vgafont *, int, unsigned int *));
+static int _vga_mapchar __P((void *, const struct vgafont *, int, unsigned int *));
static int
_vga_mapchar(id, font, uni, index)
void *id;
- struct vgafont *font;
+ const struct vgafont *font;
int uni;
unsigned int *index;
{