summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2001-05-01 02:21:43 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2001-05-01 02:21:43 +0000
commit2f60632972a81bdd387986076b8285c023c02450 (patch)
treecdc8c3e61d7771c7cff3bdb937b6ffa960506689 /sys/dev/ic
parent25084ada4974efc0f9508b242c29f37ea98fc5c1 (diff)
constify some arrays
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/opl.c6
-rw-r--r--sys/dev/ic/oplinstrs.c6
-rw-r--r--sys/dev/ic/oplvar.h8
3 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/ic/opl.c b/sys/dev/ic/opl.c
index 53049c04f4c..7da00cb7028 100644
--- a/sys/dev/ic/opl.c
+++ b/sys/dev/ic/opl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: opl.c,v 1.1 1999/01/02 00:02:40 niklas Exp $ */
+/* $OpenBSD: opl.c,v 1.2 2001/05/01 02:21:42 mickey Exp $ */
/* $NetBSD: opl.c,v 1.7 1998/12/08 14:26:56 augustss Exp $ */
/*
@@ -279,7 +279,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]);
@@ -435,7 +435,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 61f4f7d8461..dd32b8faff9 100644
--- a/sys/dev/ic/oplinstrs.c
+++ b/sys/dev/ic/oplinstrs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: oplinstrs.c,v 1.1 1999/01/02 00:02:41 niklas Exp $ */
+/* $OpenBSD: oplinstrs.c,v 1.2 2001/05/01 02:21:42 mickey 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 ad0585b3884..4012db239c3 100644
--- a/sys/dev/ic/oplvar.h
+++ b/sys/dev/ic/oplvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: oplvar.h,v 1.1 1999/01/02 00:02:41 niklas Exp $ */
+/* $OpenBSD: oplvar.h,v 1.2 2001/05/01 02:21:42 mickey Exp $ */
/* $NetBSD: oplvar.h,v 1.3 1998/11/25 22:17:06 augustss Exp $ */
/*
@@ -44,7 +44,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;
};
@@ -85,8 +85,8 @@ struct opl_operators {
};
#define OPL_NINSTR 256
-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 *));