summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorjdolecek <jdolecek@NetBSD.org>2001-01-22 14:30:43 +0000
committerjdolecek <jdolecek@NetBSD.org>2001-01-22 14:30:43 +0000
commit9e7736f1dc2071335fca9cfbe070450a30be8656 (patch)
treebe1ef3148e96c9db5dcf93b99d0e946b5aacfc4b /sys/dev
parent3e7f1eed59fd5a7364f50b43a873e017190ece9e (diff)
make patches[] const
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/aic7xxx.c14
-rw-r--r--sys/dev/microcode/aic7xxx/aic7xxx_seq.h2
-rw-r--r--sys/dev/microcode/aic7xxx/aicasm.c4
3 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/ic/aic7xxx.c b/sys/dev/ic/aic7xxx.c
index 58b21540a27..68f65b03b3a 100644
--- a/sys/dev/ic/aic7xxx.c
+++ b/sys/dev/ic/aic7xxx.c
@@ -1,4 +1,4 @@
-/* $NetBSD: aic7xxx.c,v 1.63 2001/01/18 20:28:16 jdolecek Exp $ */
+/* $NetBSD: aic7xxx.c,v 1.64 2001/01/22 14:30:43 jdolecek Exp $ */
/*
* Generic driver for the aic7xxx based adaptec SCSI controllers
@@ -250,7 +250,7 @@ static void ahc_handle_devreset(struct ahc_softc *, struct ahc_devinfo *,
static void ahc_dumpseq(struct ahc_softc *);
#endif
static void ahc_loadseq(struct ahc_softc *);
-static int ahc_check_patch(struct ahc_softc *, struct patch **,
+static int ahc_check_patch(struct ahc_softc *, const struct patch **,
int, int *);
static void ahc_download_instr(struct ahc_softc *, int, u_int8_t *);
static int ahc_match_scb(struct scb *, int, char, int, u_int, role_t);
@@ -4401,7 +4401,7 @@ ahc_dumpseq(struct ahc_softc* ahc)
static void
ahc_loadseq(struct ahc_softc *ahc)
{
- struct patch *cur_patch;
+ const struct patch *cur_patch;
int i;
int downloaded;
int skip_addr;
@@ -4440,11 +4440,11 @@ ahc_loadseq(struct ahc_softc *ahc)
}
static int
-ahc_check_patch(struct ahc_softc *ahc, struct patch **start_patch,
+ahc_check_patch(struct ahc_softc *ahc, const struct patch **start_patch,
int start_instr, int *skip_addr)
{
- struct patch *cur_patch;
- struct patch *last_patch;
+ const struct patch *cur_patch;
+ const struct patch *last_patch;
int num_patches;
num_patches = sizeof(patches)/sizeof(struct patch);
@@ -4503,7 +4503,7 @@ ahc_download_instr(struct ahc_softc *ahc, int instrptr, u_int8_t *dconsts)
case AIC_OP_JE:
case AIC_OP_JZ:
{
- struct patch *cur_patch;
+ const struct patch *cur_patch;
int address_offset;
u_int address;
int skip_addr;
diff --git a/sys/dev/microcode/aic7xxx/aic7xxx_seq.h b/sys/dev/microcode/aic7xxx/aic7xxx_seq.h
index 96d86d03ccc..02df00b1710 100644
--- a/sys/dev/microcode/aic7xxx/aic7xxx_seq.h
+++ b/sys/dev/microcode/aic7xxx/aic7xxx_seq.h
@@ -863,7 +863,7 @@ ahc_patch0_func(struct ahc_softc *ahc)
}
typedef int patch_func_t __P((struct ahc_softc *));
-struct patch {
+const struct patch {
patch_func_t *patch_func;
u_int32_t begin :10,
skip_instr :10,
diff --git a/sys/dev/microcode/aic7xxx/aicasm.c b/sys/dev/microcode/aic7xxx/aicasm.c
index c1ef4a3d7a0..5e0f92a0e6b 100644
--- a/sys/dev/microcode/aic7xxx/aicasm.c
+++ b/sys/dev/microcode/aic7xxx/aicasm.c
@@ -1,4 +1,4 @@
-/* $NetBSD: aicasm.c,v 1.2 2001/01/18 20:28:18 jdolecek Exp $ */
+/* $NetBSD: aicasm.c,v 1.3 2001/01/22 14:30:44 jdolecek Exp $ */
/*
* Aic7xxx SCSI host adapter firmware asssembler
@@ -352,7 +352,7 @@ ahc_patch%d_func(struct ahc_softc *ahc)
fprintf(ofile,
"typedef int patch_func_t __P((struct ahc_softc *));
-struct patch {
+const struct patch {
patch_func_t *patch_func;
u_int32_t begin :10,
skip_instr :10,