summaryrefslogtreecommitdiff
path: root/sys/dev
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
parente912e655e179f7c8dd5317da1faff48b8b02cf8e (diff)
constify
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/eisa/devlist2h.awk4
-rw-r--r--sys/dev/eisa/eisa.c4
-rw-r--r--sys/dev/eisa/eisadevs_data.h4
-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
-rw-r--r--sys/dev/isa/fd.c24
-rw-r--r--sys/dev/isa/gus.c14
-rw-r--r--sys/dev/microcode/aic7xxx/aic7xxx_seq.h2
-rw-r--r--sys/dev/microcode/aic7xxx/aicasm.c4
-rw-r--r--sys/dev/midisyn.c10
-rw-r--r--sys/dev/mulaw.c10
-rw-r--r--sys/dev/pci/ahc_pci.c16
-rw-r--r--sys/dev/pci/bktr/bktr_core.c32
-rw-r--r--sys/dev/pci/bktr/bktr_tuner.c26
-rw-r--r--sys/dev/pci/cmpci.c4
-rw-r--r--sys/dev/pci/cs4280.c6
-rw-r--r--sys/dev/pci/cs4280_image.h4
-rw-r--r--sys/dev/pci/if_ti.c15
-rw-r--r--sys/dev/pci/ti_fw.h34
-rw-r--r--sys/dev/pci/ti_fw2.h34
-rw-r--r--sys/dev/pcmcia/if_awi_pcmcia.c12
-rw-r--r--sys/dev/pcmcia/if_ne_pcmcia.c6
-rw-r--r--sys/dev/pcmcia/if_wi.c12
-rw-r--r--sys/dev/pcmcia/pcmcia_cis_quirks.c41
-rw-r--r--sys/dev/pcmcia/pcmciavar.h8
-rw-r--r--sys/dev/scsipi/atapiconf.c4
-rw-r--r--sys/dev/scsipi/scsiconf.c4
-rw-r--r--sys/dev/scsipi/st.c4
-rw-r--r--sys/dev/usb/devlist2h.awk4
-rw-r--r--sys/dev/usb/ezload.c8
-rw-r--r--sys/dev/usb/ezload.h6
-rw-r--r--sys/dev/usb/if_aue.c12
-rw-r--r--sys/dev/usb/if_kue.c14
-rw-r--r--sys/dev/usb/usb_quirks.c10
-rw-r--r--sys/dev/usb/usb_quirks.h6
-rw-r--r--sys/dev/usb/usb_subr.c6
-rw-r--r--sys/dev/usb/usbdevs_data.h4
-rw-r--r--sys/dev/usb/usbdi.h4
-rw-r--r--sys/dev/usb/usbdivar.h4
-rw-r--r--sys/dev/usb/uyap.c6
-rw-r--r--sys/dev/wscons/wsemul_vt100_chars.c10
53 files changed, 309 insertions, 307 deletions
diff --git a/sys/dev/eisa/devlist2h.awk b/sys/dev/eisa/devlist2h.awk
index 098e094b461..1ad3a089e44 100644
--- a/sys/dev/eisa/devlist2h.awk
+++ b/sys/dev/eisa/devlist2h.awk
@@ -1,5 +1,5 @@
#! /usr/bin/awk -f
-# $NetBSD: devlist2h.awk,v 1.5 1998/01/09 06:46:26 thorpej Exp $
+# $NetBSD: devlist2h.awk,v 1.6 2001/01/18 20:28:25 jdolecek Exp $
#
# Copyright (c) 1995, 1996 Christopher G. Demetriou
# All rights reserved.
@@ -155,7 +155,7 @@ END {
printf("\n") > dfile
- printf("struct eisa_knowndev eisa_knowndevs[] = {\n") > dfile
+ printf("const struct eisa_knowndev eisa_knowndevs[] = {\n") > dfile
for (i = 1; i <= nproducts; i++) {
printf("\t{\n") > dfile
printf("\t 0,\n") > dfile
diff --git a/sys/dev/eisa/eisa.c b/sys/dev/eisa/eisa.c
index ddeeb1cacaf..1dcbaa89713 100644
--- a/sys/dev/eisa/eisa.c
+++ b/sys/dev/eisa/eisa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: eisa.c,v 1.23 2000/09/01 17:18:20 ad Exp $ */
+/* $NetBSD: eisa.c,v 1.24 2001/01/18 20:28:25 jdolecek Exp $ */
/*
* Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -213,7 +213,7 @@ eisa_devinfo(const char *id, char *cp)
{
#ifdef EISAVERBOSE
const char *name;
- struct eisa_knowndev *edp;
+ const struct eisa_knowndev *edp;
int match, onlyvendor;
onlyvendor = 0;
diff --git a/sys/dev/eisa/eisadevs_data.h b/sys/dev/eisa/eisadevs_data.h
index 542f1816ee5..fc4d595db61 100644
--- a/sys/dev/eisa/eisadevs_data.h
+++ b/sys/dev/eisa/eisadevs_data.h
@@ -1,4 +1,4 @@
-/* $NetBSD: eisadevs_data.h,v 1.23 2000/10/19 15:29:14 ad Exp $ */
+/* $NetBSD: eisadevs_data.h,v 1.24 2001/01/18 20:28:25 jdolecek Exp $ */
/*
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
@@ -38,7 +38,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-struct eisa_knowndev eisa_knowndevs[] = {
+const struct eisa_knowndev eisa_knowndevs[] = {
{
0,
"ADP0000",
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;
{
diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c
index 7e3ae058eb8..1fdeb13fc01 100644
--- a/sys/dev/isa/fd.c
+++ b/sys/dev/isa/fd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fd.c,v 1.12 2001/01/08 02:03:47 fvdl Exp $ */
+/* $NetBSD: fd.c,v 1.13 2001/01/18 20:28:19 jdolecek Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -178,19 +178,19 @@ struct fd_type {
int rate; /* transfer speed code */
u_char fillbyte; /* format fill byte */
u_char interleave; /* interleave factor (formatting) */
- char *name;
+ const char *name;
};
#if NMCA > 0
/* MCA - specific entries */
-struct fd_type mca_fd_types[] = {
+const struct fd_type mca_fd_types[] = {
{ 18,2,36,2,0xff,0x0f,0x1b,0x6c,80,2880,1,FDC_500KBPS,0xf6,1, "1.44MB" }, /* 1.44MB diskette - XXX try 16ms step rate */
{ 9,2,18,2,0xff,0x4f,0x2a,0x50,80,1440,1,FDC_250KBPS,0xf6,1, "720KB" }, /* 3.5 inch 720kB diskette - XXX try 24ms step rate */
};
#endif /* NMCA > 0 */
/* The order of entries in the following table is important -- BEWARE! */
-struct fd_type fd_types[] = {
+const struct fd_type fd_types[] = {
{ 18,2,36,2,0xff,0xcf,0x1b,0x6c,80,2880,1,FDC_500KBPS,0xf6,1, "1.44MB" }, /* 1.44MB diskette */
{ 15,2,30,2,0xff,0xdf,0x1b,0x54,80,2400,1,FDC_500KBPS,0xf6,1, "1.2MB" }, /* 1.2 MB AT-diskettes */
{ 9,2,18,2,0xff,0xdf,0x23,0x50,40, 720,2,FDC_300KBPS,0xf6,1, "360KB/AT" }, /* 360kB in 1.2MB drive */
@@ -205,7 +205,7 @@ struct fd_softc {
struct device sc_dev;
struct disk sc_dk;
- struct fd_type *sc_deftype; /* default type descriptor */
+ const struct fd_type *sc_deftype; /* default type descriptor */
struct fd_type *sc_type; /* current type descriptor */
struct fd_type sc_type_copy; /* copy for fiddling when formatting */
@@ -255,7 +255,7 @@ void fdstart __P((struct fd_softc *));
struct dkdriver fddkdriver = { fdstrategy };
#if defined(i386)
-struct fd_type *fd_nvtotype __P((char *, int, int));
+const struct fd_type *fd_nvtotype __P((char *, int, int));
#endif /* i386 */
void fd_set_motor __P((struct fdc_softc *fdc, int reset));
void fd_motor_off __P((void *arg));
@@ -267,7 +267,7 @@ void fdctimeout __P((void *arg));
void fdcpseudointr __P((void *arg));
void fdcretry __P((struct fdc_softc *fdc));
void fdfinish __P((struct fd_softc *fd, struct buf *bp));
-__inline struct fd_type *fd_dev_to_type __P((struct fd_softc *, dev_t));
+__inline const struct fd_type *fd_dev_to_type __P((struct fd_softc *, dev_t));
int fdformat __P((dev_t, struct ne7_fd_formb *, struct proc *));
void fd_mountroot_hook __P((struct device *));
@@ -277,7 +277,7 @@ void fd_mountroot_hook __P((struct device *));
*/
struct fdc_attach_args {
int fa_drive;
- struct fd_type *fa_deftype;
+ const struct fd_type *fa_deftype;
};
/*
@@ -446,7 +446,7 @@ fdattach(parent, self, aux)
struct fdc_softc *fdc = (void *)parent;
struct fd_softc *fd = (void *)self;
struct fdc_attach_args *fa = aux;
- struct fd_type *type = fa->fa_deftype;
+ const struct fd_type *type = fa->fa_deftype;
int drive = fa->fa_drive;
callout_init(&fd->sc_motoron_ch);
@@ -492,7 +492,7 @@ fdattach(parent, self, aux)
* Translate nvram type into internal data structure. Return NULL for
* none/unknown/unusable.
*/
-struct fd_type *
+const struct fd_type *
fd_nvtotype(fdc, nvraminfo, drive)
char *fdc;
int nvraminfo, drive;
@@ -532,7 +532,7 @@ fd_nvtotype(fdc, nvraminfo, drive)
}
#endif /* i386 */
-__inline struct fd_type *
+__inline const struct fd_type *
fd_dev_to_type(fd, dev)
struct fd_softc *fd;
dev_t dev;
@@ -790,7 +790,7 @@ fdopen(dev, flags, mode, p)
struct proc *p;
{
struct fd_softc *fd;
- struct fd_type *type;
+ const struct fd_type *type;
fd = device_lookup(&fd_cd, FDUNIT(dev));
if (fd == NULL)
diff --git a/sys/dev/isa/gus.c b/sys/dev/isa/gus.c
index 6a1484560e7..e0f76b6caa7 100644
--- a/sys/dev/isa/gus.c
+++ b/sys/dev/isa/gus.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gus.c,v 1.69 2000/03/23 07:01:34 thorpej Exp $ */
+/* $NetBSD: gus.c,v 1.70 2001/01/18 20:28:19 jdolecek Exp $ */
/*-
* Copyright (c) 1996, 1999 The NetBSD Foundation, Inc.
@@ -449,11 +449,11 @@ struct cfattach gus_ca = {
* registers. A zero means that the referenced IRQ/DRQ is invalid
*/
-static int gus_irq_map[] = {
+static const int gus_irq_map[] = {
IRQUNK, IRQUNK, 1, 3, IRQUNK, 2, IRQUNK, 4, IRQUNK, 1, IRQUNK, 5, 6,
IRQUNK, IRQUNK, 7
};
-static int gus_drq_map[] = {
+static const int gus_drq_map[] = {
DRQUNK, 1, DRQUNK, 2, DRQUNK, 3, 4, 5
};
@@ -461,10 +461,10 @@ static int gus_drq_map[] = {
* A list of valid base addresses for the GUS
*/
-static int gus_base_addrs[] = {
+static const int gus_base_addrs[] = {
0x210, 0x220, 0x230, 0x240, 0x250, 0x260
};
-static int gus_addrs = sizeof(gus_base_addrs) / sizeof(gus_base_addrs[0]);
+static const int gus_addrs = sizeof(gus_base_addrs) / sizeof(gus_base_addrs[0]);
/*
* Maximum frequency values of the GUS based on the number of currently active
@@ -472,7 +472,7 @@ static int gus_addrs = sizeof(gus_base_addrs) / sizeof(gus_base_addrs[0]);
* is dependent on the number of active voices. Yes, it is pretty weird.
*/
-static int gus_max_frequency[] = {
+static const int gus_max_frequency[] = {
44100, /* 14 voices */
41160, /* 15 voices */
38587, /* 16 voices */
@@ -498,7 +498,7 @@ static int gus_max_frequency[] = {
* by the GF1 chip on the GUS. From GUS SDK vol1.c.
*/
-static unsigned short gus_log_volumes[512] = {
+static const unsigned short gus_log_volumes[512] = {
0x0000,
0x0700, 0x07ff, 0x0880, 0x08ff, 0x0940, 0x0980, 0x09c0, 0x09ff, 0x0a20,
0x0a40, 0x0a60, 0x0a80, 0x0aa0, 0x0ac0, 0x0ae0, 0x0aff, 0x0b10, 0x0b20,
diff --git a/sys/dev/microcode/aic7xxx/aic7xxx_seq.h b/sys/dev/microcode/aic7xxx/aic7xxx_seq.h
index 63dcd3e7edb..96d86d03ccc 100644
--- a/sys/dev/microcode/aic7xxx/aic7xxx_seq.h
+++ b/sys/dev/microcode/aic7xxx/aic7xxx_seq.h
@@ -1,7 +1,7 @@
/*
* DO NOT EDIT - This file is automatically generated.
*/
-static u_int8_t seqprog[] = {
+static const u_int8_t seqprog[] = {
0xff, 0x6a, 0x06, 0x08,
0x08, 0x6a, 0x68, 0x00,
0x7f, 0x02, 0x04, 0x08,
diff --git a/sys/dev/microcode/aic7xxx/aicasm.c b/sys/dev/microcode/aic7xxx/aicasm.c
index 1e1b352872d..c1ef4a3d7a0 100644
--- a/sys/dev/microcode/aic7xxx/aicasm.c
+++ b/sys/dev/microcode/aic7xxx/aicasm.c
@@ -1,4 +1,4 @@
-/* $NetBSD: aicasm.c,v 1.1 2000/03/15 02:09:13 fvdl Exp $ */
+/* $NetBSD: aicasm.c,v 1.2 2001/01/18 20:28:18 jdolecek Exp $ */
/*
* Aic7xxx SCSI host adapter firmware asssembler
@@ -310,7 +310,7 @@ output_code(ofile)
* DO NOT EDIT - This file is automatically generated.
*/\n");
- fprintf(ofile, "static u_int8_t seqprog[] = {\n");
+ fprintf(ofile, "static const u_int8_t seqprog[] = {\n");
for(cur_instr = STAILQ_FIRST(&seq_program);
cur_instr != NULL;
cur_instr = STAILQ_NEXT(cur_instr, links)) {
diff --git a/sys/dev/midisyn.c b/sys/dev/midisyn.c
index ca28953cf63..1ca0917cbf5 100644
--- a/sys/dev/midisyn.c
+++ b/sys/dev/midisyn.c
@@ -1,4 +1,4 @@
-/* $NetBSD: midisyn.c,v 1.6 2000/03/29 03:43:31 simonb Exp $ */
+/* $NetBSD: midisyn.c,v 1.7 2001/01/18 20:28:20 jdolecek Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -86,7 +86,7 @@ struct midi_hw_if midisyn_hw_if = {
midisyn_ioctl,
};
-static int midi_lengths[] = { 3,3,3,3,2,2,3,1 };
+static const int midi_lengths[] = { 3,3,3,3,2,2,3,1 };
/* Number of bytes in a MIDI command, including status */
#define MIDI_LENGTH(d) (midi_lengths[((d) >> 4) & 7])
@@ -330,7 +330,7 @@ midisyn_note_to_freq(note)
{
int o, n, f;
#define BASE_OCTAVE 5
- static u_int32_t notes[] = {
+ static const u_int32_t notes[] = {
17145893, 18165441, 19245614, 20390018, 21602472, 22887021,
24247954, 25689813, 27217409, 28835840, 30550508, 32367136
};
@@ -355,13 +355,13 @@ midisyn_finetune(base_freq, bend, range, vibrato_cents)
int range;
int vibrato_cents;
{
- static u_int16_t semitone_tuning[24] =
+ static const u_int16_t semitone_tuning[24] =
{
/* 0 */ 10000, 10595, 11225, 11892, 12599, 13348, 14142, 14983,
/* 8 */ 15874, 16818, 17818, 18877, 20000, 21189, 22449, 23784,
/* 16 */ 25198, 26697, 28284, 29966, 31748, 33636, 35636, 37755
};
- static u_int16_t cent_tuning[100] =
+ static const u_int16_t cent_tuning[100] =
{
/* 0 */ 10000, 10006, 10012, 10017, 10023, 10029, 10035, 10041,
/* 8 */ 10046, 10052, 10058, 10064, 10070, 10075, 10081, 10087,
diff --git a/sys/dev/mulaw.c b/sys/dev/mulaw.c
index 34888d0fdf4..22087cfb164 100644
--- a/sys/dev/mulaw.c
+++ b/sys/dev/mulaw.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mulaw.c,v 1.14 2000/08/18 05:55:31 wiz Exp $ */
+/* $NetBSD: mulaw.c,v 1.15 2001/01/18 20:28:20 jdolecek Exp $ */
/*
* Copyright (c) 1991-1993 Regents of the University of California.
@@ -43,7 +43,7 @@
* The 16 bits are represented as an array of two bytes for easier access
* to the individual bytes.
*/
-static u_char mulawtolin16[256][2] = {
+static const u_char mulawtolin16[256][2] = {
{0x02,0x84}, {0x06,0x84}, {0x0a,0x84}, {0x0e,0x84},
{0x12,0x84}, {0x16,0x84}, {0x1a,0x84}, {0x1e,0x84},
{0x22,0x84}, {0x26,0x84}, {0x2a,0x84}, {0x2e,0x84},
@@ -110,7 +110,7 @@ static u_char mulawtolin16[256][2] = {
{0x80,0x18}, {0x80,0x10}, {0x80,0x08}, {0x80,0x00},
};
-static u_char lintomulaw[256] = {
+static const u_char lintomulaw[256] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
0x01, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03,
0x03, 0x04, 0x04, 0x04, 0x04, 0x05, 0x05, 0x05,
@@ -145,7 +145,7 @@ static u_char lintomulaw[256] = {
0x81, 0x81, 0x81, 0x81, 0x80, 0x80, 0x80, 0x80,
};
-static u_char alawtolin16[256][2] = {
+static const u_char alawtolin16[256][2] = {
{0x6a,0x80}, {0x6b,0x80}, {0x68,0x80}, {0x69,0x80},
{0x6e,0x80}, {0x6f,0x80}, {0x6c,0x80}, {0x6d,0x80},
{0x62,0x80}, {0x63,0x80}, {0x60,0x80}, {0x61,0x80},
@@ -212,7 +212,7 @@ static u_char alawtolin16[256][2] = {
{0x83,0x30}, {0x83,0x10}, {0x83,0x70}, {0x83,0x50},
};
-static u_char lintoalaw[256] = {
+static const u_char lintoalaw[256] = {
0x2a, 0x2a, 0x2a, 0x2a, 0x2b, 0x2b, 0x2b, 0x2b,
0x28, 0x28, 0x28, 0x28, 0x29, 0x29, 0x29, 0x29,
0x2e, 0x2e, 0x2e, 0x2e, 0x2f, 0x2f, 0x2f, 0x2f,
diff --git a/sys/dev/pci/ahc_pci.c b/sys/dev/pci/ahc_pci.c
index b325625fe32..0e3bb16b595 100644
--- a/sys/dev/pci/ahc_pci.c
+++ b/sys/dev/pci/ahc_pci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ahc_pci.c,v 1.28 2000/12/28 22:59:11 sommerfeld Exp $ */
+/* $NetBSD: ahc_pci.c,v 1.29 2001/01/18 20:28:15 jdolecek Exp $ */
/*
* Product specific probe and attach routines for:
@@ -180,11 +180,11 @@ static ahc_device_setup_t ahc_aha398XX_setup;
struct ahc_pci_identity {
u_int64_t full_id;
u_int64_t id_mask;
- char *name;
+ const char *name;
ahc_device_setup_t *setup;
};
-struct ahc_pci_identity ahc_pci_ident_table [] =
+const struct ahc_pci_identity ahc_pci_ident_table [] =
{
/* aic7850 based controllers */
{
@@ -549,7 +549,7 @@ static const int ahc_num_pci_devs =
#define CACHESIZE 0x0000003f /* only 5 bits */
#define LATTIME 0x0000ff00
-static struct ahc_pci_identity *ahc_find_pci_device(pcireg_t, pcireg_t);
+static const struct ahc_pci_identity *ahc_find_pci_device(pcireg_t, pcireg_t);
static int ahc_ext_scbram_present(struct ahc_softc *ahc);
static void ahc_ext_scbram_config(struct ahc_softc *ahc, int enable,
int pcheck, int fast);
@@ -565,12 +565,12 @@ struct cfattach ahc_pci_ca = {
sizeof(struct ahc_softc), ahc_pci_probe, ahc_pci_attach
};
-static struct ahc_pci_identity *
+static const struct ahc_pci_identity *
ahc_find_pci_device(id, subid)
pcireg_t id, subid;
{
u_int64_t full_id;
- struct ahc_pci_identity *entry;
+ const struct ahc_pci_identity *entry;
u_int i;
full_id = ahc_compose_id(PCI_PRODUCT(id), PCI_VENDOR(id),
@@ -591,7 +591,7 @@ ahc_pci_probe(parent, match, aux)
void *aux;
{
struct pci_attach_args *pa = aux;
- struct ahc_pci_identity *entry;
+ const struct ahc_pci_identity *entry;
pcireg_t subid;
subid = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_SUBSYS_ID_REG);
@@ -605,7 +605,7 @@ ahc_pci_attach(parent, self, aux)
void *aux;
{
struct pci_attach_args *pa = aux;
- struct ahc_pci_identity *entry;
+ const struct ahc_pci_identity *entry;
struct ahc_softc *ahc = (void *)self;
pcireg_t command;
ahc_chip ahc_t = AHC_NONE;
diff --git a/sys/dev/pci/bktr/bktr_core.c b/sys/dev/pci/bktr/bktr_core.c
index 2dc9c2c2c27..14f3e42718f 100644
--- a/sys/dev/pci/bktr/bktr_core.c
+++ b/sys/dev/pci/bktr/bktr_core.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bktr_core.c,v 1.14 2000/12/30 16:52:36 wiz Exp $ */
+/* $NetBSD: bktr_core.c,v 1.15 2001/01/18 20:28:24 jdolecek Exp $ */
/* FreeBSD: src/sys/dev/bktr/bktr_core.c,v 1.114 2000/10/31 13:09:56 roger Exp */
@@ -279,7 +279,7 @@ typedef u_char bool_t;
* Parameters describing size of transmitted image.
*/
-static struct format_params format_params[] = {
+static const struct format_params format_params[] = {
/* # define BT848_IFORM_F_AUTO (0x0) - don't matter. */
{ 525, 26, 480, 910, 135, 754, 640, 780, 30, 0x68, 0x5d, BT848_IFORM_X_AUTO,
12, 1600 },
@@ -310,7 +310,7 @@ static struct format_params format_params[] = {
* Table of supported Pixel Formats
*/
-static struct meteor_pixfmt_internal {
+static const struct meteor_pixfmt_internal {
struct meteor_pixfmt public;
u_int color_fmt;
} pixfmt_table[] = {
@@ -339,7 +339,7 @@ static struct meteor_pixfmt_internal {
*/
/* FIXME: Also add YUV_422 and YUV_PACKED as well */
-static struct {
+static const struct {
u_long meteor_format;
struct meteor_pixfmt public;
} meteor_pixfmt_table[] = {
@@ -2627,7 +2627,7 @@ static bool_t split(bktr_reg_t * bktr, volatile u_long **dma_prog, int width ,
volatile u_char ** target_buffer, int cols ) {
u_long flag, flag2;
- struct meteor_pixfmt *pf = &pixfmt_table[ bktr->pixfmt ].public;
+ const struct meteor_pixfmt *pf = &pixfmt_table[ bktr->pixfmt ].public;
u_int skip, start_skip;
/* For RGB24, we need to align the component in FIFO Byte Lane 0 */
@@ -2717,7 +2717,7 @@ rgb_vbi_prog( bktr_ptr_t bktr, char i_flag, int cols, int rows, int interlace )
volatile u_long *dma_prog; /* DMA prog is an array of
32 bit RISC instructions */
volatile u_long *loop_point;
- struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
+ const struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
u_int Bpp = pf_int->public.Bpp;
unsigned int vbisamples; /* VBI samples per line */
unsigned int vbilines; /* VBI lines per field */
@@ -2897,7 +2897,7 @@ rgb_prog( bktr_ptr_t bktr, char i_flag, int cols, int rows, int interlace )
volatile u_long target_buffer, buffer, target,width;
volatile u_long pitch;
volatile u_long *dma_prog;
- struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
+ const struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
u_int Bpp = pf_int->public.Bpp;
OUTB(bktr, BKTR_COLOR_FMT, pf_int->color_fmt);
@@ -3061,7 +3061,7 @@ yuvpack_prog( bktr_ptr_t bktr, char i_flag,
volatile unsigned int inst3;
volatile u_long target_buffer, buffer;
volatile u_long *dma_prog;
- struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
+ const struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
int b;
OUTB(bktr, BKTR_COLOR_FMT, pf_int->color_fmt);
@@ -3175,7 +3175,7 @@ yuv422_prog( bktr_ptr_t bktr, char i_flag,
volatile unsigned int inst;
volatile u_long target_buffer, t1, buffer;
volatile u_long *dma_prog;
- struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
+ const struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
OUTB(bktr, BKTR_COLOR_FMT, pf_int->color_fmt);
@@ -3289,7 +3289,7 @@ yuv12_prog( bktr_ptr_t bktr, char i_flag,
volatile unsigned int inst1;
volatile u_long target_buffer, t1, buffer;
volatile u_long *dma_prog;
- struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
+ const struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
OUTB(bktr, BKTR_COLOR_FMT, pf_int->color_fmt);
@@ -3397,8 +3397,8 @@ build_dma_prog( bktr_ptr_t bktr, char i_flag )
int rows, cols, interlace;
int tmp_int;
unsigned int temp;
- struct format_params *fp;
- struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
+ const struct format_params *fp;
+ const struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
fp = &format_params[bktr->format_params];
@@ -3604,7 +3604,7 @@ static void
start_capture( bktr_ptr_t bktr, unsigned type )
{
u_char i_flag;
- struct format_params *fp;
+ const struct format_params *fp;
fp = &format_params[bktr->format_params];
@@ -3662,7 +3662,7 @@ start_capture( bktr_ptr_t bktr, unsigned type )
static void
set_fps( bktr_ptr_t bktr, u_short fps )
{
- struct format_params *fp;
+ const struct format_params *fp;
int i_flag;
fp = &format_params[bktr->format_params];
@@ -3714,7 +3714,7 @@ set_fps( bktr_ptr_t bktr, u_short fps )
static u_int pixfmt_swap_flags( int pixfmt )
{
- struct meteor_pixfmt *pf = &pixfmt_table[ pixfmt ].public;
+ const struct meteor_pixfmt *pf = &pixfmt_table[ pixfmt ].public;
u_int swapf = 0;
switch ( pf->Bpp ) {
@@ -3743,7 +3743,7 @@ static u_int pixfmt_swap_flags( int pixfmt )
static int oformat_meteor_to_bt( u_long format )
{
int i;
- struct meteor_pixfmt *pf1, *pf2;
+ const struct meteor_pixfmt *pf1, *pf2;
/* Find format in compatibility table */
for ( i = 0; i < METEOR_PIXFMT_TABLE_SIZE; i++ )
diff --git a/sys/dev/pci/bktr/bktr_tuner.c b/sys/dev/pci/bktr/bktr_tuner.c
index 31fa67e6ced..20d455847b1 100644
--- a/sys/dev/pci/bktr/bktr_tuner.c
+++ b/sys/dev/pci/bktr/bktr_tuner.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bktr_tuner.c,v 1.7 2000/12/30 16:52:37 wiz Exp $ */
+/* $NetBSD: bktr_tuner.c,v 1.8 2001/01/18 20:28:24 jdolecek Exp $ */
/* FreeBSD: src/sys/dev/bktr/bktr_tuner.c,v 1.9 2000/10/19 07:33:28 roger Exp */
@@ -316,7 +316,7 @@ static const struct TUNER tuners[] = {
* IF freq: 45.75 mHz
*/
#define OFFSET 6.00
-static int nabcst[] = {
+static const int nabcst[] = {
83, (int)( 45.75 * FREQFACTOR), 0,
14, (int)(471.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
7, (int)(175.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
@@ -339,7 +339,7 @@ static int nabcst[] = {
* IF freq: 45.75 mHz
*/
#define OFFSET 6.00
-static int irccable[] = {
+static const int irccable[] = {
116, (int)( 45.75 * FREQFACTOR), 0,
100, (int)(649.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
95, (int)( 91.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
@@ -365,7 +365,7 @@ static int irccable[] = {
* IF freq: 45.75 mHz
*/
#define OFFSET 6.00
-static int hrccable[] = {
+static const int hrccable[] = {
116, (int)( 45.75 * FREQFACTOR), 0,
100, (int)(648.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
95, (int)( 90.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
@@ -521,7 +521,7 @@ static int hrccable[] = {
* 121 3890 000 IFFREQ
*
*/
-static int weurope[] = {
+static const int weurope[] = {
121, (int)( 38.90 * FREQFACTOR), 0,
100, (int)(303.25 * FREQFACTOR), (int)(8.00 * FREQFACTOR),
90, (int)(231.25 * FREQFACTOR), (int)(7.00 * FREQFACTOR),
@@ -551,7 +551,7 @@ static int weurope[] = {
*/
#define OFFSET 6.00
#define IF_FREQ 45.75
-static int jpnbcst[] = {
+static const int jpnbcst[] = {
62, (int)(IF_FREQ * FREQFACTOR), 0,
13, (int)(471.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
8, (int)(193.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
@@ -576,7 +576,7 @@ static int jpnbcst[] = {
*/
#define OFFSET 6.00
#define IF_FREQ 45.75
-static int jpncable[] = {
+static const int jpncable[] = {
63, (int)(IF_FREQ * FREQFACTOR), 0,
23, (int)(223.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
22, (int)(165.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
@@ -607,7 +607,7 @@ static int jpncable[] = {
* IF freq: 38.90 MHz
*/
#define IF_FREQ 38.90
-static int xussr[] = {
+static const int xussr[] = {
107, (int)(IF_FREQ * FREQFACTOR), 0,
78, (int)(231.25 * FREQFACTOR), (int)(8.00 * FREQFACTOR),
70, (int)(111.25 * FREQFACTOR), (int)(8.00 * FREQFACTOR),
@@ -625,7 +625,7 @@ static int xussr[] = {
*/
#define OFFSET 7.00
#define IF_FREQ 38.90
-static int australia[] = {
+static const int australia[] = {
83, (int)(IF_FREQ * FREQFACTOR), 0,
28, (int)(527.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
10, (int)(209.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
@@ -643,7 +643,7 @@ static int australia[] = {
*/
#define OFFSET 8.00
#define IF_FREQ 38.90
-static int france[] = {
+static const int france[] = {
69, (int)(IF_FREQ * FREQFACTOR), 0,
21, (int)(471.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), /* 21 -> 69 */
5, (int)(176.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), /* 5 -> 10 */
@@ -655,9 +655,9 @@ static int france[] = {
#undef OFFSET
#undef IF_FREQ
-static struct {
- int *ptr;
- char name[BT848_MAX_CHNLSET_NAME_LEN];
+static const struct {
+ const int *ptr;
+ const char name[BT848_MAX_CHNLSET_NAME_LEN];
} freqTable[] = {
{NULL, ""},
{nabcst, "nabcst"},
diff --git a/sys/dev/pci/cmpci.c b/sys/dev/pci/cmpci.c
index 54501753adc..dc2030f1a0c 100644
--- a/sys/dev/pci/cmpci.c
+++ b/sys/dev/pci/cmpci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cmpci.c,v 1.5 2000/12/28 22:59:11 sommerfeld Exp $ */
+/* $NetBSD: cmpci.c,v 1.6 2001/01/18 20:28:15 jdolecek Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -247,7 +247,7 @@ cmpci_reg_clear_4(sc, no, mask)
/* rate */
-static struct {
+static const struct {
int rate;
int divider;
} cmpci_rate_table[CMPCI_REG_NUMRATE] = {
diff --git a/sys/dev/pci/cs4280.c b/sys/dev/pci/cs4280.c
index 895816c6c53..29df14d308c 100644
--- a/sys/dev/pci/cs4280.c
+++ b/sys/dev/pci/cs4280.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cs4280.c,v 1.11 2001/01/15 23:25:39 perry Exp $ */
+/* $NetBSD: cs4280.c,v 1.12 2001/01/18 20:28:15 jdolecek Exp $ */
/*
* Copyright (c) 1999, 2000 Tatoku Ogaito. All rights reserved.
@@ -171,7 +171,7 @@ int cs4280_intr __P((void *));
void cs4280_reset __P((void *));
int cs4280_download_image __P((struct cs4280_softc *));
-int cs4280_download(struct cs4280_softc *, u_int32_t *, u_int32_t, u_int32_t);
+int cs4280_download(struct cs4280_softc *, const u_int32_t *, u_int32_t, u_int32_t);
int cs4280_allocmem __P((struct cs4280_softc *, size_t, size_t,
struct cs4280_dma *));
int cs4280_freemem __P((struct cs4280_softc *, struct cs4280_dma *));
@@ -821,7 +821,7 @@ cs4280_intr(p)
int
cs4280_download(sc, src, offset, len)
struct cs4280_softc *sc;
- u_int32_t *src;
+ const u_int32_t *src;
u_int32_t offset, len;
{
u_int32_t ctr;
diff --git a/sys/dev/pci/cs4280_image.h b/sys/dev/pci/cs4280_image.h
index 517587808dc..fcfdf87f3f6 100644
--- a/sys/dev/pci/cs4280_image.h
+++ b/sys/dev/pci/cs4280_image.h
@@ -1,4 +1,4 @@
-/* $NetBSD: cs4280_image.h,v 1.1 1999/12/13 20:19:24 augustss Exp $ */
+/* $NetBSD: cs4280_image.h,v 1.2 2001/01/18 20:28:15 jdolecek Exp $ */
/* This source is based on cwcimage.h in cwcealdr1.zip, the
* sample source by Crystal Semiconductor.
@@ -11,7 +11,7 @@
#ifndef _CLCS_IMAGE_H
#define _CLCS_IMAGE_H
-struct BA1struct BA1Struct = {
+const struct BA1struct BA1Struct = {
{{ 0x00000000, 0x00003000 },{ 0x00010000, 0x00003800 },{ 0x00020000, 0x00007000 }},
{0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,
diff --git a/sys/dev/pci/if_ti.c b/sys/dev/pci/if_ti.c
index 3197dc77674..a8533a71f34 100644
--- a/sys/dev/pci/if_ti.c
+++ b/sys/dev/pci/if_ti.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ti.c,v 1.18 2001/01/14 17:41:17 thorpej Exp $ */
+/* $NetBSD: if_ti.c,v 1.19 2001/01/18 20:28:15 jdolecek Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -135,7 +135,7 @@
* Various supported device vendors/types and their names.
*/
-static struct ti_type ti_devs[] = {
+static const struct ti_type ti_devs[] = {
{ PCI_VENDOR_ALTEON, PCI_PRODUCT_ALTEON_ACENIC,
"Alteon AceNIC 1000baseSX Gigabit Ethernet" },
{ PCI_VENDOR_ALTEON, PCI_PRODUCT_ALTEON_ACENIC_COPPER,
@@ -151,7 +151,7 @@ static struct ti_type ti_devs[] = {
{ 0, 0, NULL }
};
-static struct ti_type *ti_type_match __P((struct pci_attach_args *));
+static const struct ti_type *ti_type_match __P((struct pci_attach_args *));
static int ti_probe __P((struct device *, struct cfdata *, void *));
static void ti_attach __P((struct device *, struct device *, void *));
static void ti_shutdown __P((void *));
@@ -1570,10 +1570,11 @@ static int ti_gibinit(sc)
/*
* look for id in the device list, returning the first match
*/
-static struct ti_type * ti_type_match(pa)
+static const struct ti_type *
+ti_type_match(pa)
struct pci_attach_args *pa;
{
- struct ti_type *t;
+ const struct ti_type *t;
t = ti_devs;
while(t->ti_name != NULL) {
@@ -1597,7 +1598,7 @@ static int ti_probe(parent, match, aux)
void *aux;
{
struct pci_attach_args *pa = aux;
- struct ti_type *t;
+ const struct ti_type *t;
t = ti_type_match(pa);
@@ -1618,7 +1619,7 @@ static void ti_attach(parent, self, aux)
const char *intrstr = NULL;
bus_dma_segment_t dmaseg;
int error, dmanseg, nolinear;
- struct ti_type *t;
+ const struct ti_type *t;
t = ti_type_match(pa);
if (t == NULL) {
diff --git a/sys/dev/pci/ti_fw.h b/sys/dev/pci/ti_fw.h
index e2014f7ebf7..c9c63dc32d4 100644
--- a/sys/dev/pci/ti_fw.h
+++ b/sys/dev/pci/ti_fw.h
@@ -4,21 +4,21 @@
*
* $FreeBSD: /c/ncvs/src/sys/pci/ti_fw.h,v 1.9 2000/07/20 22:24:42 wpaul Exp $
*/
-static int tigonFwReleaseMajor = 0xc;
-static int tigonFwReleaseMinor = 0x4;
-static int tigonFwReleaseFix = 0xd;
-static u_int32_t tigonFwStartAddr = 0x00004000;
-static u_int32_t tigonFwTextAddr = 0x00004000;
-static int tigonFwTextLen = 0x11160;
-static u_int32_t tigonFwRodataAddr = 0x00015160;
-static int tigonFwRodataLen = 0xae0;
-static u_int32_t tigonFwDataAddr = 0x00015c60;
-static int tigonFwDataLen = 0x180;
-static u_int32_t tigonFwSbssAddr = 0x00015de0;
-static int tigonFwSbssLen = 0x38;
-static u_int32_t tigonFwBssAddr = 0x00015e20;
-static int tigonFwBssLen = 0x2080;
-static u_int32_t tigonFwText[] = {
+static const int tigonFwReleaseMajor = 0xc;
+static const int tigonFwReleaseMinor = 0x4;
+static const int tigonFwReleaseFix = 0xd;
+static const u_int32_t tigonFwStartAddr = 0x00004000;
+static const u_int32_t tigonFwTextAddr = 0x00004000;
+static const int tigonFwTextLen = 0x11160;
+static const u_int32_t tigonFwRodataAddr = 0x00015160;
+static const int tigonFwRodataLen = 0xae0;
+static const u_int32_t tigonFwDataAddr = 0x00015c60;
+static const int tigonFwDataLen = 0x180;
+static const u_int32_t tigonFwSbssAddr = 0x00015de0;
+static const int tigonFwSbssLen = 0x38;
+static const u_int32_t tigonFwBssAddr = 0x00015e20;
+static const int tigonFwBssLen = 0x2080;
+static const u_int32_t tigonFwText[] = {
0x10000003,
0x0, 0xd, 0xd, 0x3c1d0001,
0x8fbd5c94, 0x3a0f021, 0x3c100000, 0x26104000,
@@ -4394,7 +4394,7 @@ static u_int32_t tigonFwText[] = {
0x8fbf0024, 0x8fb40020, 0x8fb3001c, 0x8fb20018,
0x8fb10014, 0x8fb00010, 0x3e00008, 0x27bd0028,
0x0, 0x0, 0x0, 0x0 };
-static u_int32_t tigonFwRodata[] = {
+static const u_int32_t tigonFwRodata[] = {
0x24486561, 0x6465723a, 0x202f7072,
0x6f6a6563, 0x74732f72, 0x63732f73, 0x772f6765,
0x2f2e2f6e, 0x69632f66, 0x772f636f, 0x6d6d6f6e,
@@ -4570,7 +4570,7 @@ static u_int32_t tigonFwRodata[] = {
0x0, 0x14c4c, 0x14c4c, 0x14b94,
0x14bd8, 0x14c4c, 0x14c4c, 0x14b94,
0x0, 0x0 };
-static u_int32_t tigonFwData[] = {
+static const u_int32_t tigonFwData[] = {
0x416c7465,
0x6f6e2041, 0x63654e49, 0x43205600, 0x416c7465,
0x6f6e2041, 0x63654e49, 0x43205600, 0x42424242,
diff --git a/sys/dev/pci/ti_fw2.h b/sys/dev/pci/ti_fw2.h
index a7cda25dc80..e966930ab44 100644
--- a/sys/dev/pci/ti_fw2.h
+++ b/sys/dev/pci/ti_fw2.h
@@ -9,21 +9,21 @@
*
* $FreeBSD: /c/ncvs/src/sys/pci/ti_fw2.h,v 1.10 2000/07/26 23:55:34 wpaul Exp $
*/
-static int tigon2FwReleaseMajor = 0xc;
-static int tigon2FwReleaseMinor = 0x4;
-static int tigon2FwReleaseFix = 0xd;
-static u_int32_t tigon2FwStartAddr = 0x00004000;
-static u_int32_t tigon2FwTextAddr = 0x00004000;
-static int tigon2FwTextLen = 0x11c80;
-static u_int32_t tigon2FwRodataAddr = 0x00015c80;
-static int tigon2FwRodataLen = 0x10d0;
-static u_int32_t tigon2FwDataAddr = 0x00016d80;
-static int tigon2FwDataLen = 0x1c0;
-static u_int32_t tigon2FwSbssAddr = 0x00016f40;
-static int tigon2FwSbssLen = 0xcc;
-static u_int32_t tigon2FwBssAddr = 0x00017010;
-static int tigon2FwBssLen = 0x20c0;
-static u_int32_t tigon2FwText[] = {
+static const int tigon2FwReleaseMajor = 0xc;
+static const int tigon2FwReleaseMinor = 0x4;
+static const int tigon2FwReleaseFix = 0xd;
+static const u_int32_t tigon2FwStartAddr = 0x00004000;
+static const u_int32_t tigon2FwTextAddr = 0x00004000;
+static const int tigon2FwTextLen = 0x11c80;
+static const u_int32_t tigon2FwRodataAddr = 0x00015c80;
+static const int tigon2FwRodataLen = 0x10d0;
+static const u_int32_t tigon2FwDataAddr = 0x00016d80;
+static const int tigon2FwDataLen = 0x1c0;
+static const u_int32_t tigon2FwSbssAddr = 0x00016f40;
+static const int tigon2FwSbssLen = 0xcc;
+static const u_int32_t tigon2FwBssAddr = 0x00017010;
+static const int tigon2FwBssLen = 0x20c0;
+static const u_int32_t tigon2FwText[] = {
0x0,
0x10000003, 0x0, 0xd, 0xd,
0x3c1d0001, 0x8fbd6de0, 0x3a0f021, 0x3c100000,
@@ -4577,7 +4577,7 @@ static u_int32_t tigon2FwText[] = {
0x24020001, 0x8f430328, 0x1021, 0x24630001,
0x3e00008, 0xaf430328, 0x3e00008, 0x0,
0x0, 0x0, 0x0, 0x0 };
-static u_int32_t tigon2FwRodata[] = {
+static const u_int32_t tigon2FwRodata[] = {
0x24486561,
0x6465723a, 0x202f7072, 0x6f6a6563, 0x74732f72,
0x63732f73, 0x772f6765, 0x2f2e2f6e, 0x69632f66,
@@ -4848,7 +4848,7 @@ static u_int32_t tigon2FwRodata[] = {
0x0, 0x14f98, 0x14f98, 0x14c4c,
0x14c98, 0x14ce4, 0x14f98, 0x7365746d,
0x61636163, 0x74000000, 0x0, 0x0 };
-static u_int32_t tigon2FwData[] = {
+static const u_int32_t tigon2FwData[] = {
0x1,
0x1, 0x1, 0xc001fc, 0x3ffc,
0xc00000, 0x46726565, 0x42534420, 0x5469676f,
diff --git a/sys/dev/pcmcia/if_awi_pcmcia.c b/sys/dev/pcmcia/if_awi_pcmcia.c
index 2bbdf6b4224..c28633d758d 100644
--- a/sys/dev/pcmcia/if_awi_pcmcia.c
+++ b/sys/dev/pcmcia/if_awi_pcmcia.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_awi_pcmcia.c,v 1.17 2000/07/05 02:27:25 onoe Exp $ */
+/* $NetBSD: if_awi_pcmcia.c,v 1.18 2001/01/18 20:28:25 jdolecek Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -122,7 +122,7 @@ struct cfattach awi_pcmcia_ca = {
awi_pcmcia_detach, awi_activate
};
-static struct awi_pcmcia_product {
+static const struct awi_pcmcia_product {
u_int32_t app_vendor; /* vendor ID */
u_int32_t app_product; /* product ID */
const char *app_cisinfo[4]; /* CIS information */
@@ -153,14 +153,14 @@ static struct awi_pcmcia_product {
{ NULL, NULL, NULL, NULL }, NULL },
};
-static struct awi_pcmcia_product *
+static const struct awi_pcmcia_product *
awi_pcmcia_lookup __P((struct pcmcia_attach_args *));
-static struct awi_pcmcia_product *
+static const struct awi_pcmcia_product *
awi_pcmcia_lookup(pa)
struct pcmcia_attach_args *pa;
{
- struct awi_pcmcia_product *app;
+ const struct awi_pcmcia_product *app;
for (app = awi_pcmcia_products; app->app_name != NULL; app++) {
/* match by vendor/product id */
@@ -295,7 +295,7 @@ awi_pcmcia_attach(parent, self, aux)
{
struct awi_pcmcia_softc *psc = (void *)self;
struct awi_softc *sc = &psc->sc_awi;
- struct awi_pcmcia_product *app;
+ const struct awi_pcmcia_product *app;
struct pcmcia_attach_args *pa = aux;
struct pcmcia_config_entry *cfe;
bus_addr_t memoff;
diff --git a/sys/dev/pcmcia/if_ne_pcmcia.c b/sys/dev/pcmcia/if_ne_pcmcia.c
index cb632225db5..f4fd03a25a8 100644
--- a/sys/dev/pcmcia/if_ne_pcmcia.c
+++ b/sys/dev/pcmcia/if_ne_pcmcia.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ne_pcmcia.c,v 1.66 2000/11/03 09:07:24 toddpw Exp $ */
+/* $NetBSD: if_ne_pcmcia.c,v 1.67 2001/01/18 20:28:26 jdolecek Exp $ */
/*
* Copyright (c) 1997 Marc Horowitz. All rights reserved.
@@ -87,7 +87,7 @@ struct cfattach ne_pcmcia_ca = {
ne_pcmcia_detach, dp8390_activate
};
-struct ne2000dev {
+static const struct ne2000dev {
char *name;
int32_t manufacturer;
int32_t product;
@@ -492,7 +492,7 @@ ne_pcmcia_attach(parent, self, aux)
struct dp8390_softc *dsc = &nsc->sc_dp8390;
struct pcmcia_attach_args *pa = aux;
struct pcmcia_config_entry *cfe;
- struct ne2000dev *ne_dev;
+ const struct ne2000dev *ne_dev;
int i;
u_int8_t myea[6], *enaddr;
void (*npp_init_media) __P((struct dp8390_softc *, int **,
diff --git a/sys/dev/pcmcia/if_wi.c b/sys/dev/pcmcia/if_wi.c
index 475744226a9..571da96efcd 100644
--- a/sys/dev/pcmcia/if_wi.c
+++ b/sys/dev/pcmcia/if_wi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wi.c,v 1.51 2001/01/14 06:54:01 ichiro Exp $ */
+/* $NetBSD: if_wi.c,v 1.52 2001/01/18 20:28:26 jdolecek Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -130,7 +130,7 @@ struct wi_pcmcia_product {
int pp_prism2; /* prism2 chipset */
};
-static struct wi_pcmcia_product *wi_lookup __P((struct pcmcia_attach_args *pa));
+static const struct wi_pcmcia_product *wi_lookup __P((struct pcmcia_attach_args *pa));
static int wi_match __P((struct device *, struct cfdata *, void *));
static void wi_attach __P((struct device *, struct device *, void *));
static int wi_detach __P((struct device *, int));
@@ -184,7 +184,7 @@ struct cfattach wi_ca = {
sizeof(struct wi_softc), wi_match, wi_attach, wi_detach, wi_activate
};
-static struct wi_pcmcia_product wi_pcmcia_products[] = {
+static const struct wi_pcmcia_product wi_pcmcia_products[] = {
{ PCMCIA_VENDOR_LUCENT,
PCMCIA_PRODUCT_LUCENT_WAVELAN_IEEE,
PCMCIA_CIS_LUCENT_WAVELAN_IEEE,
@@ -240,11 +240,11 @@ static struct wi_pcmcia_product wi_pcmcia_products[] = {
0 }
};
-static struct wi_pcmcia_product *
+static const struct wi_pcmcia_product *
wi_lookup(pa)
struct pcmcia_attach_args *pa;
{
- struct wi_pcmcia_product *pp;
+ const struct wi_pcmcia_product *pp;
/*
* match by CIS information first
@@ -334,7 +334,7 @@ wi_attach(parent, self, aux)
struct wi_softc *sc = (void *) self;
struct pcmcia_attach_args *pa = aux;
struct ifnet *ifp = &sc->sc_ethercom.ec_if;
- struct wi_pcmcia_product *pp;
+ const struct wi_pcmcia_product *pp;
struct wi_ltv_macaddr mac;
struct wi_ltv_gen gen;
char devinfo[256];
diff --git a/sys/dev/pcmcia/pcmcia_cis_quirks.c b/sys/dev/pcmcia/pcmcia_cis_quirks.c
index 8a7fb41dbbc..16cf908984a 100644
--- a/sys/dev/pcmcia/pcmcia_cis_quirks.c
+++ b/sys/dev/pcmcia/pcmcia_cis_quirks.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pcmcia_cis_quirks.c,v 1.7 2001/01/10 17:37:27 aymeric Exp $ */
+/* $NetBSD: pcmcia_cis_quirks.c,v 1.8 2001/01/18 20:28:26 jdolecek Exp $ */
#define PCMCIADEBUG
@@ -48,7 +48,7 @@
/* these structures are just static templates which are then copied
into "live" allocated structures */
-static struct pcmcia_function pcmcia_dlink_de650_func0 = {
+static const struct pcmcia_function pcmcia_dlink_de650_func0 = {
0,
PCMCIA_FUNCTION_NETWORK,
0x23,
@@ -56,7 +56,7 @@ static struct pcmcia_function pcmcia_dlink_de650_func0 = {
0x0b,
};
-static struct pcmcia_config_entry pcmcia_dlink_de650_func0_cfe0 = {
+static const struct pcmcia_config_entry pcmcia_dlink_de650_func0_cfe0 = {
0x20,
PCMCIA_CFE_IO16 | PCMCIA_CFE_IRQLEVEL,
PCMCIA_IFTYPE_IO,
@@ -69,7 +69,7 @@ static struct pcmcia_config_entry pcmcia_dlink_de650_func0_cfe0 = {
0,
};
-static struct pcmcia_config_entry pcmcia_dlink_de650_func0_cfe1 = {
+static const struct pcmcia_config_entry pcmcia_dlink_de650_func0_cfe1 = {
0x21,
PCMCIA_CFE_IO16 | PCMCIA_CFE_IRQLEVEL,
PCMCIA_IFTYPE_IO,
@@ -82,7 +82,7 @@ static struct pcmcia_config_entry pcmcia_dlink_de650_func0_cfe1 = {
0,
};
-static struct pcmcia_config_entry pcmcia_dlink_de650_func0_cfe2 = {
+static const struct pcmcia_config_entry pcmcia_dlink_de650_func0_cfe2 = {
0x22,
PCMCIA_CFE_IO16 | PCMCIA_CFE_IRQLEVEL,
PCMCIA_IFTYPE_IO,
@@ -95,7 +95,7 @@ static struct pcmcia_config_entry pcmcia_dlink_de650_func0_cfe2 = {
0,
};
-static struct pcmcia_config_entry pcmcia_dlink_de650_func0_cfe3 = {
+static const struct pcmcia_config_entry pcmcia_dlink_de650_func0_cfe3 = {
0x23,
PCMCIA_CFE_IO16 | PCMCIA_CFE_IRQLEVEL,
PCMCIA_IFTYPE_IO,
@@ -108,7 +108,7 @@ static struct pcmcia_config_entry pcmcia_dlink_de650_func0_cfe3 = {
0,
};
-static struct pcmcia_function pcmcia_3cxem556_func0 = {
+static const struct pcmcia_function pcmcia_3cxem556_func0 = {
0, /* function number */
PCMCIA_FUNCTION_NETWORK,
0x07, /* last cfe number */
@@ -116,7 +116,7 @@ static struct pcmcia_function pcmcia_3cxem556_func0 = {
0x63, /* ccr_mask */
};
-static struct pcmcia_config_entry pcmcia_3cxem556_func0_cfe0 = {
+static const struct pcmcia_config_entry pcmcia_3cxem556_func0_cfe0 = {
0x07, /* cfe number */
PCMCIA_CFE_IO8 | PCMCIA_CFE_IO16 | PCMCIA_CFE_IRQLEVEL,
PCMCIA_IFTYPE_IO,
@@ -129,7 +129,7 @@ static struct pcmcia_config_entry pcmcia_3cxem556_func0_cfe0 = {
0, /* maxtwins */
};
-static struct pcmcia_function pcmcia_3cxem556_func1 = {
+static const struct pcmcia_function pcmcia_3cxem556_func1 = {
1, /* function number */
PCMCIA_FUNCTION_SERIAL,
0x27, /* last cfe number */
@@ -137,7 +137,7 @@ static struct pcmcia_function pcmcia_3cxem556_func1 = {
0x63, /* ccr_mask */
};
-static struct pcmcia_config_entry pcmcia_3cxem556_func1_cfe0 = {
+static const struct pcmcia_config_entry pcmcia_3cxem556_func1_cfe0 = {
0x27, /* cfe number */
PCMCIA_CFE_IO8 | PCMCIA_CFE_IRQLEVEL,
PCMCIA_IFTYPE_IO,
@@ -150,7 +150,7 @@ static struct pcmcia_config_entry pcmcia_3cxem556_func1_cfe0 = {
0, /* maxtwins */
};
-static struct pcmcia_function pcmcia_3ccfem556bi_func0 = {
+static const struct pcmcia_function pcmcia_3ccfem556bi_func0 = {
0, /* function number */
PCMCIA_FUNCTION_NETWORK,
0x07, /* last cfe number */
@@ -158,7 +158,7 @@ static struct pcmcia_function pcmcia_3ccfem556bi_func0 = {
0x267, /* ccr_mask */
};
-static struct pcmcia_config_entry pcmcia_3ccfem556bi_func0_cfe0 = {
+static const struct pcmcia_config_entry pcmcia_3ccfem556bi_func0_cfe0 = {
0x07, /* cfe number */
PCMCIA_CFE_IO8 | PCMCIA_CFE_IO16 | PCMCIA_CFE_IRQLEVEL,
PCMCIA_IFTYPE_IO,
@@ -171,7 +171,7 @@ static struct pcmcia_config_entry pcmcia_3ccfem556bi_func0_cfe0 = {
0, /* maxtwins */
};
-static struct pcmcia_function pcmcia_3ccfem556bi_func1 = {
+static const struct pcmcia_function pcmcia_3ccfem556bi_func1 = {
1, /* function number */
PCMCIA_FUNCTION_SERIAL,
0x27, /* last cfe number */
@@ -179,7 +179,7 @@ static struct pcmcia_function pcmcia_3ccfem556bi_func1 = {
0x277, /* ccr_mask */
};
-static struct pcmcia_config_entry pcmcia_3ccfem556bi_func1_cfe0 = {
+static const struct pcmcia_config_entry pcmcia_3ccfem556bi_func1_cfe0 = {
0x27, /* cfe number */
PCMCIA_CFE_IO8 | PCMCIA_CFE_IRQLEVEL,
PCMCIA_IFTYPE_IO,
@@ -192,7 +192,7 @@ static struct pcmcia_config_entry pcmcia_3ccfem556bi_func1_cfe0 = {
0, /* maxtwins */
};
-static struct pcmcia_function pcmcia_sveclancard_func0 = {
+static const struct pcmcia_function pcmcia_sveclancard_func0 = {
0, /* function number */
PCMCIA_FUNCTION_NETWORK,
0x1, /* last cfe number */
@@ -200,7 +200,7 @@ static struct pcmcia_function pcmcia_sveclancard_func0 = {
0x1, /* ccr_mask */
};
-static struct pcmcia_config_entry pcmcia_sveclancard_func0_cfe0 = {
+static const struct pcmcia_config_entry pcmcia_sveclancard_func0_cfe0 = {
0x1, /* cfe number */
PCMCIA_CFE_MWAIT_REQUIRED | PCMCIA_CFE_RDYBSY_ACTIVE |
PCMCIA_CFE_WP_ACTIVE | PCMCIA_CFE_BVD_ACTIVE | PCMCIA_CFE_IO16,
@@ -214,7 +214,7 @@ static struct pcmcia_config_entry pcmcia_sveclancard_func0_cfe0 = {
0, /* maxtwins */
};
-static struct pcmcia_function pcmcia_ndc_nd5100_func0 = {
+static const struct pcmcia_function pcmcia_ndc_nd5100_func0 = {
0, /* function number */
PCMCIA_FUNCTION_NETWORK,
0x23, /* last cfe number */
@@ -222,7 +222,7 @@ static struct pcmcia_function pcmcia_ndc_nd5100_func0 = {
0x3, /* ccr_mask */
};
-static struct pcmcia_config_entry pcmcia_ndc_nd5100_func0_cfe0 = {
+static const struct pcmcia_config_entry pcmcia_ndc_nd5100_func0_cfe0 = {
0x20, /* cfe number */
PCMCIA_CFE_MWAIT_REQUIRED | PCMCIA_CFE_IO16 | PCMCIA_CFE_IRQLEVEL,
PCMCIA_IFTYPE_IO,
@@ -235,7 +235,7 @@ static struct pcmcia_config_entry pcmcia_ndc_nd5100_func0_cfe0 = {
0, /* maxtwins */
};
-static struct pcmcia_cis_quirk pcmcia_cis_quirks[] = {
+static const struct pcmcia_cis_quirk pcmcia_cis_quirks[] = {
{ PCMCIA_VENDOR_LINKSYS, PCMCIA_PRODUCT_LINKSYS_ECARD_1,
PCMCIA_CIS_INVALID,
&pcmcia_dlink_de650_func0, &pcmcia_dlink_de650_func0_cfe0 },
@@ -276,7 +276,8 @@ void pcmcia_check_cis_quirks(sc)
{
int wiped = 0;
int i, j;
- struct pcmcia_function *pf, *pf_next, *pf_last;
+ struct pcmcia_function *pf, *pf_next;
+ const struct pcmcia_function *pf_last;
struct pcmcia_config_entry *cfe, *cfe_next;
pf = NULL;
diff --git a/sys/dev/pcmcia/pcmciavar.h b/sys/dev/pcmcia/pcmciavar.h
index a0ed624ca04..6ee0300577e 100644
--- a/sys/dev/pcmcia/pcmciavar.h
+++ b/sys/dev/pcmcia/pcmciavar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: pcmciavar.h,v 1.13 2000/10/17 10:13:47 haya Exp $ */
+/* $NetBSD: pcmciavar.h,v 1.14 2001/01/18 20:28:26 jdolecek Exp $ */
/*
* Copyright (c) 1997 Marc Horowitz. All rights reserved.
@@ -202,9 +202,9 @@ struct pcmcia_softc {
struct pcmcia_cis_quirk {
int32_t manufacturer;
int32_t product;
- char *cis1_info[4];
- struct pcmcia_function *pf;
- struct pcmcia_config_entry *cfe;
+ const char *cis1_info[4];
+ const struct pcmcia_function *pf;
+ const struct pcmcia_config_entry *cfe;
};
struct pcmcia_attach_args {
diff --git a/sys/dev/scsipi/atapiconf.c b/sys/dev/scsipi/atapiconf.c
index f1b568549e4..be0f3fc6113 100644
--- a/sys/dev/scsipi/atapiconf.c
+++ b/sys/dev/scsipi/atapiconf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: atapiconf.c,v 1.35 2000/04/02 23:38:19 augustss Exp $ */
+/* $NetBSD: atapiconf.c,v 1.36 2001/01/18 20:28:21 jdolecek Exp $ */
/*
* Copyright (c) 1996 Manuel Bouyer. All rights reserved.
@@ -65,7 +65,7 @@ extern struct cfdriver atapibus_cd;
int atapibusprint __P((void *, const char *));
-struct scsi_quirk_inquiry_pattern atapi_quirk_patterns[] = {
+const struct scsi_quirk_inquiry_pattern atapi_quirk_patterns[] = {
{{T_CDROM, T_REMOV,
"ALPS ELECTRIC CO.,LTD. DC544C", "", "SW03D"}, ADEV_NOTUR},
{{T_CDROM, T_REMOV,
diff --git a/sys/dev/scsipi/scsiconf.c b/sys/dev/scsipi/scsiconf.c
index a9682c810af..b98f6b7cacb 100644
--- a/sys/dev/scsipi/scsiconf.c
+++ b/sys/dev/scsipi/scsiconf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: scsiconf.c,v 1.153 2000/12/03 13:30:36 ad Exp $ */
+/* $NetBSD: scsiconf.c,v 1.154 2001/01/18 20:28:21 jdolecek Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -450,7 +450,7 @@ scsibusprint(aux, pnp)
return (UNCONF);
}
-struct scsi_quirk_inquiry_pattern scsi_quirk_patterns[] = {
+const struct scsi_quirk_inquiry_pattern scsi_quirk_patterns[] = {
{{T_CDROM, T_REMOV,
"CHINON ", "CD-ROM CDS-431 ", ""}, SDEV_NOLUNS},
{{T_CDROM, T_REMOV,
diff --git a/sys/dev/scsipi/st.c b/sys/dev/scsipi/st.c
index 43c106cdbde..1e4970694da 100644
--- a/sys/dev/scsipi/st.c
+++ b/sys/dev/scsipi/st.c
@@ -1,4 +1,4 @@
-/* $NetBSD: st.c,v 1.133 2000/11/22 00:32:24 soren Exp $ */
+/* $NetBSD: st.c,v 1.134 2001/01/18 20:28:21 jdolecek Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -135,7 +135,7 @@ struct st_quirk_inquiry_pattern {
struct quirkdata quirkdata;
};
-struct st_quirk_inquiry_pattern st_quirk_patterns[] = {
+const struct st_quirk_inquiry_pattern st_quirk_patterns[] = {
{{T_SEQUENTIAL, T_REMOV,
" ", " ", " "}, {0, 0, {
{ST_Q_FORCE_BLKSIZE, 512, 0}, /* minor 0-3 */
diff --git a/sys/dev/usb/devlist2h.awk b/sys/dev/usb/devlist2h.awk
index 49ef274e983..d2613f294a6 100644
--- a/sys/dev/usb/devlist2h.awk
+++ b/sys/dev/usb/devlist2h.awk
@@ -1,5 +1,5 @@
#! /usr/bin/awk -f
-# $NetBSD: devlist2h.awk,v 1.8 1999/11/18 23:32:25 augustss Exp $
+# $NetBSD: devlist2h.awk,v 1.9 2001/01/18 20:28:22 jdolecek Exp $
#
# Copyright (c) 1995, 1996 Christopher G. Demetriou
# All rights reserved.
@@ -174,7 +174,7 @@ END {
printf("\n") > dfile
- printf("struct usb_knowndev usb_knowndevs[] = {\n") > dfile
+ printf("const struct usb_knowndev usb_knowndevs[] = {\n") > dfile
for (i = 1; i <= nproducts; i++) {
printf("\t{\n") > dfile
printf("\t USB_VENDOR_%s, USB_PRODUCT_%s_%s,\n",
diff --git a/sys/dev/usb/ezload.c b/sys/dev/usb/ezload.c
index fa321adcd56..cd528276dea 100644
--- a/sys/dev/usb/ezload.c
+++ b/sys/dev/usb/ezload.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ezload.c,v 1.1 2001/01/02 18:49:56 augustss Exp $ */
+/* $NetBSD: ezload.c,v 1.2 2001/01/18 20:28:23 jdolecek Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -106,10 +106,10 @@ ezload_reset(usbd_device_handle dev, int reset)
}
usbd_status
-ezload_download(usbd_device_handle dev, struct ezdata *rec)
+ezload_download(usbd_device_handle dev, const struct ezdata *rec)
{
usb_device_request_t req;
- struct ezdata *ptr;
+ const struct ezdata *ptr;
usbd_status err;
u_int len, offs;
@@ -145,7 +145,7 @@ ezload_download(usbd_device_handle dev, struct ezdata *rec)
}
usbd_status
-ezload_downloads_and_reset(usbd_device_handle dev, struct ezdata **recs)
+ezload_downloads_and_reset(usbd_device_handle dev, const struct ezdata **recs)
{
usbd_status err;
diff --git a/sys/dev/usb/ezload.h b/sys/dev/usb/ezload.h
index 48e772cbe29..ccd17e20873 100644
--- a/sys/dev/usb/ezload.h
+++ b/sys/dev/usb/ezload.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ezload.h,v 1.1 2001/01/02 22:24:00 augustss Exp $ */
+/* $NetBSD: ezload.h,v 1.2 2001/01/18 20:28:23 jdolecek Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -43,5 +43,5 @@ struct ezdata {
};
usbd_status ezload_reset(usbd_device_handle, int);
-usbd_status ezload_download(usbd_device_handle, struct ezdata *);
-usbd_status ezload_downloads_and_reset(usbd_device_handle, struct ezdata **);
+usbd_status ezload_download(usbd_device_handle, const struct ezdata *);
+usbd_status ezload_downloads_and_reset(usbd_device_handle, const struct ezdata **);
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c
index bc9ceeeda78..e4e4ce4971a 100644
--- a/sys/dev/usb/if_aue.c
+++ b/sys/dev/usb/if_aue.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_aue.c,v 1.50 2000/12/14 07:51:36 thorpej Exp $ */
+/* $NetBSD: if_aue.c,v 1.51 2001/01/18 20:28:23 jdolecek Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
@@ -184,7 +184,7 @@ struct aue_type {
char aue_linksys;
};
-Static struct aue_type aue_devs[] = {
+Static const struct aue_type aue_devs[] = {
{ USB_VENDOR_BILLIONTON, USB_PRODUCT_BILLIONTON_USB100, 0 },
{ USB_VENDOR_MELCO, USB_PRODUCT_MELCO_LUATX1, 0 },
{ USB_VENDOR_MELCO, USB_PRODUCT_MELCO_LUATX5, 0 },
@@ -204,7 +204,7 @@ Static struct aue_type aue_devs[] = {
USB_DECLARE_DRIVER(aue);
-Static struct aue_type *aue_lookup(u_int16_t vendor, u_int16_t product);
+Static const struct aue_type *aue_lookup(u_int16_t vendor, u_int16_t product);
Static int aue_tx_list_init(struct aue_softc *);
Static int aue_rx_list_init(struct aue_softc *);
Static int aue_newbuf(struct aue_softc *, struct aue_chain *, struct mbuf *);
@@ -254,7 +254,7 @@ Static void aue_rxstart(struct ifnet *);
Static struct usb_qdat aue_qdat;
-Static device_method_t aue_methods[] = {
+Static const device_method_t aue_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, aue_match),
DEVMETHOD(device_attach, aue_attach),
@@ -701,10 +701,10 @@ aue_reset(struct aue_softc *sc)
delay(10000); /* XXX */
}
-Static struct aue_type *
+Static const struct aue_type *
aue_lookup(u_int16_t vendor, u_int16_t product)
{
- struct aue_type *t;
+ const struct aue_type *t;
for (t = aue_devs; t->aue_vid != 0; t++)
if (vendor == t->aue_vid && product == t->aue_did)
diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c
index 5185c4bd144..e4f9606cd8d 100644
--- a/sys/dev/usb/if_kue.c
+++ b/sys/dev/usb/if_kue.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_kue.c,v 1.34 2000/12/14 07:51:36 thorpej Exp $ */
+/* $NetBSD: if_kue.c,v 1.35 2001/01/18 20:28:23 jdolecek Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
@@ -172,7 +172,7 @@ int kuedebug = 0;
/*
* Various supported device vendors/products.
*/
-Static struct kue_type kue_devs[] = {
+Static const struct kue_type kue_devs[] = {
{ USB_VENDOR_AOX, USB_PRODUCT_AOX_USB101 },
{ USB_VENDOR_ADS, USB_PRODUCT_ADS_UBS10BT },
{ USB_VENDOR_ATEN, USB_PRODUCT_ATEN_UC10T },
@@ -210,7 +210,7 @@ Static void kue_setmulti(struct kue_softc *);
Static void kue_reset(struct kue_softc *);
Static usbd_status kue_ctl(struct kue_softc *, int, u_int8_t,
- u_int16_t, void *, u_int32_t);
+ u_int16_t, const void *, u_int32_t);
Static usbd_status kue_setword(struct kue_softc *, u_int8_t, u_int16_t);
Static int kue_is_warm(struct kue_softc *);
Static int kue_load_fw(struct kue_softc *);
@@ -226,7 +226,7 @@ Static void kue_shutdown(device_t);
Static struct usb_qdat kue_qdat;
-Static device_method_t kue_methods[] = {
+Static const device_method_t kue_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, kue_match),
DEVMETHOD(device_attach, kue_attach),
@@ -275,7 +275,7 @@ kue_setword(struct kue_softc *sc, u_int8_t breq, u_int16_t word)
Static usbd_status
kue_ctl(struct kue_softc *sc, int rw, u_int8_t breq, u_int16_t val,
- void *data, u_int32_t len)
+ const void *data, u_int32_t len)
{
usb_device_request_t req;
usbd_status err;
@@ -295,7 +295,7 @@ kue_ctl(struct kue_softc *sc, int rw, u_int8_t breq, u_int16_t val,
USETW(req.wLength, len);
s = splusb();
- err = KUE_DO_REQUEST(sc->kue_udev, &req, data);
+ err = KUE_DO_REQUEST(sc->kue_udev, &req, (void *)data);
splx(s);
return (err);
@@ -499,7 +499,7 @@ kue_reset(struct kue_softc *sc)
USB_MATCH(kue)
{
USB_MATCH_START(kue, uaa);
- struct kue_type *t;
+ const struct kue_type *t;
DPRINTFN(25,("kue_match: enter\n"));
diff --git a/sys/dev/usb/usb_quirks.c b/sys/dev/usb/usb_quirks.c
index a0e5ccf158c..c6054f2666e 100644
--- a/sys/dev/usb/usb_quirks.c
+++ b/sys/dev/usb/usb_quirks.c
@@ -1,4 +1,4 @@
-/* $NetBSD: usb_quirks.c,v 1.35 2001/01/11 20:35:02 explorer Exp $ */
+/* $NetBSD: usb_quirks.c,v 1.36 2001/01/18 20:28:23 jdolecek Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_quirks.c,v 1.13 1999/11/17 22:33:47 n_hibma Exp $ */
/*
@@ -50,7 +50,7 @@
extern int usbdebug;
#endif
-Static struct usbd_quirk_entry {
+Static const struct usbd_quirk_entry {
u_int16_t idVendor;
u_int16_t idProduct;
u_int16_t bcdDevice;
@@ -82,12 +82,12 @@ Static struct usbd_quirk_entry {
{ 0, 0, 0, { 0 } }
};
-struct usbd_quirks usbd_no_quirk = { 0 };
+const struct usbd_quirks usbd_no_quirk = { 0 };
-struct usbd_quirks *
+const struct usbd_quirks *
usbd_find_quirk(usb_device_descriptor_t *d)
{
- struct usbd_quirk_entry *t;
+ const struct usbd_quirk_entry *t;
for (t = usb_quirks; t->idVendor != 0; t++) {
if (t->idVendor == UGETW(d->idVendor) &&
diff --git a/sys/dev/usb/usb_quirks.h b/sys/dev/usb/usb_quirks.h
index 6d16561a7cc..5ddcfc51024 100644
--- a/sys/dev/usb/usb_quirks.h
+++ b/sys/dev/usb/usb_quirks.h
@@ -1,4 +1,4 @@
-/* $NetBSD: usb_quirks.h,v 1.18 2001/01/11 20:35:02 explorer Exp $ */
+/* $NetBSD: usb_quirks.h,v 1.19 2001/01/18 20:28:23 jdolecek Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_quirks.h,v 1.9 1999/11/12 23:31:03 n_hibma Exp $ */
/*
@@ -55,6 +55,6 @@ struct usbd_quirks {
#define UQ_ASSUME_CM_OVER_DATA 0x1000 /* modem device breaks on cm over data */
};
-extern struct usbd_quirks usbd_no_quirk;
+extern const struct usbd_quirks usbd_no_quirk;
-struct usbd_quirks *usbd_find_quirk(usb_device_descriptor_t *);
+const struct usbd_quirks *usbd_find_quirk(usb_device_descriptor_t *);
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c
index bdaaa6f2911..db063f0c3c4 100644
--- a/sys/dev/usb/usb_subr.c
+++ b/sys/dev/usb/usb_subr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: usb_subr.c,v 1.83 2001/01/08 20:21:16 augustss Exp $ */
+/* $NetBSD: usb_subr.c,v 1.84 2001/01/18 20:28:22 jdolecek Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */
/*
@@ -111,7 +111,7 @@ struct usb_knowndev {
#include <dev/usb/usbdevs_data.h>
#endif /* USBVERBOSE */
-Static const char *usbd_error_strs[] = {
+Static const char * const usbd_error_strs[] = {
"NORMAL_COMPLETION",
"IN_PROGRESS",
"PENDING_REQUESTS",
@@ -227,7 +227,7 @@ usbd_devinfo_vp(usbd_device_handle dev, char *v, char *p, int usedev)
usb_device_descriptor_t *udd = &dev->ddesc;
char *vendor = 0, *product = 0;
#ifdef USBVERBOSE
- struct usb_knowndev *kdp;
+ const struct usb_knowndev *kdp;
#endif
if (dev == NULL) {
diff --git a/sys/dev/usb/usbdevs_data.h b/sys/dev/usb/usbdevs_data.h
index 0c6f1247460..83143fcf236 100644
--- a/sys/dev/usb/usbdevs_data.h
+++ b/sys/dev/usb/usbdevs_data.h
@@ -1,4 +1,4 @@
-/* $NetBSD: usbdevs_data.h,v 1.141 2001/01/15 20:26:46 tshiozak Exp $ */
+/* $NetBSD: usbdevs_data.h,v 1.142 2001/01/18 20:28:22 jdolecek Exp $ */
/*
* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
@@ -44,7 +44,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-struct usb_knowndev usb_knowndevs[] = {
+const struct usb_knowndev usb_knowndevs[] = {
{
USB_VENDOR_3COM, USB_PRODUCT_3COM_HOMECONN,
0,
diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h
index 542faa06b39..e4884dc2d8a 100644
--- a/sys/dev/usb/usbdi.h
+++ b/sys/dev/usb/usbdi.h
@@ -1,4 +1,4 @@
-/* $NetBSD: usbdi.h,v 1.45 2000/12/13 04:05:15 augustss Exp $ */
+/* $NetBSD: usbdi.h,v 1.46 2001/01/18 20:28:23 jdolecek Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdi.h,v 1.18 1999/11/17 22:33:49 n_hibma Exp $ */
/*
@@ -170,7 +170,7 @@ void usbd_add_dev_event(int, usbd_device_handle);
void usbd_add_drv_event(int, usbd_device_handle, device_ptr_t);
void usbd_devinfo(usbd_device_handle, int, char *);
-struct usbd_quirks *usbd_get_quirks(usbd_device_handle);
+const struct usbd_quirks *usbd_get_quirks(usbd_device_handle);
usb_endpoint_descriptor_t *usbd_get_endpoint_descriptor
(usbd_interface_handle iface, u_int8_t address);
diff --git a/sys/dev/usb/usbdivar.h b/sys/dev/usb/usbdivar.h
index b6ee5f360af..bcb7898944c 100644
--- a/sys/dev/usb/usbdivar.h
+++ b/sys/dev/usb/usbdivar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: usbdivar.h,v 1.60 2000/12/28 10:40:36 augustss Exp $ */
+/* $NetBSD: usbdivar.h,v 1.61 2001/01/18 20:28:23 jdolecek Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdivar.h,v 1.11 1999/11/17 22:33:51 n_hibma Exp $ */
/*
@@ -139,7 +139,7 @@ struct usbd_device {
struct usbd_interface *ifaces; /* array of all interfaces */
usb_device_descriptor_t ddesc; /* device descriptor */
usb_config_descriptor_t *cdesc; /* full config descr */
- struct usbd_quirks *quirks; /* device quirks, always set */
+ const struct usbd_quirks *quirks; /* device quirks, always set */
struct usbd_hub *hub; /* only if this is a hub */
device_ptr_t *subdevs; /* sub-devices, 0 terminated */
};
diff --git a/sys/dev/usb/uyap.c b/sys/dev/usb/uyap.c
index cec612d1c9a..205192524b0 100644
--- a/sys/dev/usb/uyap.c
+++ b/sys/dev/usb/uyap.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uyap.c,v 1.2 2001/01/02 23:08:54 augustss Exp $ */
+/* $NetBSD: uyap.c,v 1.3 2001/01/18 20:28:23 jdolecek Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -49,10 +49,10 @@
#include <dev/usb/ezload.h>
-struct ezdata uyap_firmware[] = {
+const struct ezdata uyap_firmware[] = {
#include "dev/usb/uyap_firmware.h"
};
-struct ezdata *uyap_firmwares[] = { uyap_firmware, NULL };
+const struct ezdata *uyap_firmwares[] = { uyap_firmware, NULL };
struct uyap_softc {
USBBASEDEVICE sc_dev; /* base device */
diff --git a/sys/dev/wscons/wsemul_vt100_chars.c b/sys/dev/wscons/wsemul_vt100_chars.c
index edf0644d279..cb9df5223fa 100644
--- a/sys/dev/wscons/wsemul_vt100_chars.c
+++ b/sys/dev/wscons/wsemul_vt100_chars.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wsemul_vt100_chars.c,v 1.4 1999/02/20 18:20:02 drochner Exp $ */
+/* $NetBSD: wsemul_vt100_chars.c,v 1.5 2001/01/18 20:28:23 jdolecek Exp $ */
/*
* Copyright (c) 1998
@@ -40,7 +40,7 @@
#include <dev/wscons/wsemul_vt100var.h>
#include <dev/wscons/unicode.h>
-static u_int16_t decspcgr2uni[128] = {
+static const u_int16_t decspcgr2uni[128] = {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
@@ -59,7 +59,7 @@ static u_int16_t decspcgr2uni[128] = {
0x2502, 0x2264, 0x2265, 0x03c0, 0x2260, 0x00a3, 0x00b7, 0x007f,
};
-static u_int16_t dectech2uni[128] = {
+static const u_int16_t dectech2uni[128] = {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
@@ -96,11 +96,11 @@ vt100_initchartables(edp)
vt100_setnrc(edp, 0);
}
-static int nrcovlpos[12] = {
+static const int nrcovlpos[12] = {
0x23, 0x40, 0x5b, 0x5c, 0x5d, 0x5e, /* #@[\]^ */
0x5f, 0x60, 0x7b, 0x7c, 0x7d, 0x7e /* _`{|}~ */
};
-static struct {
+static const struct {
u_int16_t c[12];
} nrctable[] = {
/* british */