The following diff makes {audio,midi,radio,video}_hw_if structs in the
kernel const, in order to move them to rodata.

Index: share/man/man9/audio.9
===================================================================
RCS file: /OpenBSD/src/share/man/man9/audio.9,v
retrieving revision 1.29
diff -u -p -r1.29 audio.9
--- share/man/man9/audio.9      13 Sep 2019 15:47:47 -0000      1.29
+++ share/man/man9/audio.9      21 Mar 2022 12:08:58 -0000
@@ -104,7 +104,7 @@ when the latter calls
 This call is:
 .Bd -literal -offset indent
 struct device *
-audio_attach_mi(struct audio_hw_if *ahwp, void *hdl,
+audio_attach_mi(const struct audio_hw_if *ahwp, void *hdl,
                struct device *dev);
 .Ed
 .Pp
Index: share/man/man9/radio.9
===================================================================
RCS file: /OpenBSD/src/share/man/man9/radio.9,v
retrieving revision 1.11
diff -u -p -r1.11 radio.9
--- share/man/man9/radio.9      31 Aug 2016 16:54:33 -0000      1.11
+++ share/man/man9/radio.9      21 Mar 2022 12:08:58 -0000
@@ -53,7 +53,7 @@ when the latter calls
 This call should be
 .Bd -literal
 .Ft void
-.Fn radio_attach_mi "struct radio_hw_if *rhwp" "void *hdlp" \
+.Fn radio_attach_mi "const struct radio_hw_if *rhwp" "void *hdlp" \
                     "struct device * dev"
 .Ed
 .Pp
Index: sys/arch/hppa/gsc/harmony.c
===================================================================
RCS file: /OpenBSD/src/sys/arch/hppa/gsc/harmony.c,v
retrieving revision 1.37
diff -u -p -r1.37 harmony.c
--- sys/arch/hppa/gsc/harmony.c 13 Mar 2022 08:04:38 -0000      1.37
+++ sys/arch/hppa/gsc/harmony.c 21 Mar 2022 12:08:58 -0000
@@ -73,7 +73,7 @@ int     harmony_trigger_output(void *, v
 int     harmony_trigger_input(void *, void *, void *, int,
     void (*intr)(void *), void *, struct audio_params *);
 
-struct audio_hw_if harmony_sa_hw_if = {
+const struct audio_hw_if harmony_sa_hw_if = {
        harmony_open,
        harmony_close,
        harmony_set_params,
Index: sys/arch/luna88k/cbus/nec86.c
===================================================================
RCS file: /OpenBSD/src/sys/arch/luna88k/cbus/nec86.c,v
retrieving revision 1.4
diff -u -p -r1.4 nec86.c
--- sys/arch/luna88k/cbus/nec86.c       16 Feb 2022 06:21:18 -0000      1.4
+++ sys/arch/luna88k/cbus/nec86.c       21 Mar 2022 12:08:58 -0000
@@ -67,7 +67,7 @@
  * Define our interface to the higher level audio driver.
  */
 
-struct audio_hw_if nec86_hw_if = {
+const struct audio_hw_if nec86_hw_if = {
        .open           = nec86hw_open,
        .close          = nec86hw_close,
        .set_params     = nec86hw_set_params,
Index: sys/arch/luna88k/cbus/nec86var.h
===================================================================
RCS file: /OpenBSD/src/sys/arch/luna88k/cbus/nec86var.h,v
retrieving revision 1.1
diff -u -p -r1.1 nec86var.h
--- sys/arch/luna88k/cbus/nec86var.h    28 Dec 2014 13:03:18 -0000      1.1
+++ sys/arch/luna88k/cbus/nec86var.h    21 Mar 2022 12:08:58 -0000
@@ -55,7 +55,7 @@ struct nec86_softc {
        int sc_intlevel;
 };
 
-extern  struct  audio_hw_if nec86_hw_if;
+extern  const struct  audio_hw_if nec86_hw_if;
 int    nec86_probesubr(bus_space_tag_t, bus_space_handle_t,
            bus_space_handle_t);
 void   nec86_attachsubr(struct nec86_softc *);
Index: sys/arch/macppc/dev/aoa.c
===================================================================
RCS file: /OpenBSD/src/sys/arch/macppc/dev/aoa.c,v
retrieving revision 1.13
diff -u -p -r1.13 aoa.c
--- sys/arch/macppc/dev/aoa.c   13 Mar 2022 12:33:01 -0000      1.13
+++ sys/arch/macppc/dev/aoa.c   21 Mar 2022 12:08:58 -0000
@@ -65,7 +65,7 @@ struct cfdriver aoa_cd = {
        NULL, "aoa", DV_DULL
 };
 
-struct audio_hw_if aoa_hw_if = {
+const struct audio_hw_if aoa_hw_if = {
        i2s_open,
        i2s_close,
        i2s_set_params,
Index: sys/arch/macppc/dev/awacs.c
===================================================================
RCS file: /OpenBSD/src/sys/arch/macppc/dev/awacs.c,v
retrieving revision 1.36
diff -u -p -r1.36 awacs.c
--- sys/arch/macppc/dev/awacs.c 13 Mar 2022 12:33:01 -0000      1.36
+++ sys/arch/macppc/dev/awacs.c 21 Mar 2022 12:08:58 -0000
@@ -126,7 +126,7 @@ struct cfdriver awacs_cd = {
        NULL, "awacs", DV_DULL
 };
 
-struct audio_hw_if awacs_hw_if = {
+const struct audio_hw_if awacs_hw_if = {
        awacs_open,
        awacs_close,
        awacs_set_params,
Index: sys/arch/macppc/dev/daca.c
===================================================================
RCS file: /OpenBSD/src/sys/arch/macppc/dev/daca.c,v
retrieving revision 1.12
diff -u -p -r1.12 daca.c
--- sys/arch/macppc/dev/daca.c  13 Mar 2022 12:33:01 -0000      1.12
+++ sys/arch/macppc/dev/daca.c  21 Mar 2022 12:08:58 -0000
@@ -71,7 +71,7 @@ struct cfdriver daca_cd = {
        NULL, "daca", DV_DULL
 };
 
-struct audio_hw_if daca_hw_if = {
+const struct audio_hw_if daca_hw_if = {
        i2s_open,
        i2s_close,
        i2s_set_params,
Index: sys/arch/macppc/dev/onyx.c
===================================================================
RCS file: /OpenBSD/src/sys/arch/macppc/dev/onyx.c,v
retrieving revision 1.14
diff -u -p -r1.14 onyx.c
--- sys/arch/macppc/dev/onyx.c  13 Mar 2022 12:33:01 -0000      1.14
+++ sys/arch/macppc/dev/onyx.c  21 Mar 2022 12:08:58 -0000
@@ -80,7 +80,7 @@ struct cfdriver onyx_cd = {
        NULL, "onyx", DV_DULL
 };
 
-struct audio_hw_if onyx_hw_if = {
+const struct audio_hw_if onyx_hw_if = {
        i2s_open,
        i2s_close,
        i2s_set_params,
Index: sys/arch/macppc/dev/snapper.c
===================================================================
RCS file: /OpenBSD/src/sys/arch/macppc/dev/snapper.c,v
retrieving revision 1.41
diff -u -p -r1.41 snapper.c
--- sys/arch/macppc/dev/snapper.c       13 Mar 2022 12:33:01 -0000      1.41
+++ sys/arch/macppc/dev/snapper.c       21 Mar 2022 12:08:58 -0000
@@ -77,7 +77,7 @@ struct cfdriver snapper_cd = {
        NULL, "snapper", DV_DULL
 };
 
-struct audio_hw_if snapper_hw_if = {
+const struct audio_hw_if snapper_hw_if = {
        i2s_open,
        i2s_close,
        i2s_set_params,
Index: sys/arch/macppc/dev/tumbler.c
===================================================================
RCS file: /OpenBSD/src/sys/arch/macppc/dev/tumbler.c,v
retrieving revision 1.11
diff -u -p -r1.11 tumbler.c
--- sys/arch/macppc/dev/tumbler.c       13 Mar 2022 12:33:01 -0000      1.11
+++ sys/arch/macppc/dev/tumbler.c       21 Mar 2022 12:08:58 -0000
@@ -75,7 +75,7 @@ struct cfdriver tumbler_cd = {
        NULL, "tumbler", DV_DULL
 };
 
-struct audio_hw_if tumbler_hw_if = {
+const struct audio_hw_if tumbler_hw_if = {
        i2s_open,
        i2s_close,
        i2s_set_params,
Index: sys/arch/sparc64/dev/ce4231.c
===================================================================
RCS file: /OpenBSD/src/sys/arch/sparc64/dev/ce4231.c,v
retrieving revision 1.38
diff -u -p -r1.38 ce4231.c
--- sys/arch/sparc64/dev/ce4231.c       16 Feb 2022 06:21:18 -0000      1.38
+++ sys/arch/sparc64/dev/ce4231.c       21 Mar 2022 12:08:58 -0000
@@ -150,7 +150,7 @@ int ce4231_trigger_output(void *, void *
 int    ce4231_trigger_input(void *, void *, void *, int,
     void (*intr)(void *), void *arg, struct audio_params *);
 
-struct audio_hw_if ce4231_sa_hw_if = {
+const struct audio_hw_if ce4231_sa_hw_if = {
        ce4231_open,
        ce4231_close,
        ce4231_set_params,
Index: sys/dev/audio.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/audio.c,v
retrieving revision 1.197
diff -u -p -r1.197 audio.c
--- sys/dev/audio.c     22 Feb 2022 07:34:06 -0000      1.197
+++ sys/dev/audio.c     21 Mar 2022 12:08:58 -0000
@@ -113,7 +113,7 @@ struct mixer_ev {
  */
 struct audio_softc {
        struct device dev;
-       struct audio_hw_if *ops;        /* driver funcs */
+       const struct audio_hw_if *ops;  /* driver funcs */
        void *cookie;                   /* wskbd cookie */
        void *arg;                      /* first arg to driver funcs */
        int mode;                       /* bitmask of AUMODE_* */
@@ -1225,7 +1225,7 @@ audio_attach(struct device *parent, stru
 {
        struct audio_softc *sc = (void *)self;
        struct audio_attach_args *sa = aux;
-       struct audio_hw_if *ops = sa->hwif;
+       const struct audio_hw_if *ops = sa->hwif;
        struct mixer_devinfo *mi;
        struct mixer_ctrl *ent;
        void *arg = sa->hdl;
@@ -1487,7 +1487,8 @@ audio_submatch(struct device *parent, vo
 }
 
 struct device *
-audio_attach_mi(struct audio_hw_if *ops, void *arg, void *cookie, struct 
device *dev)
+audio_attach_mi(const struct audio_hw_if *ops, void *arg, void *cookie,
+    struct device *dev)
 {
        struct audio_attach_args aa;
 
Index: sys/dev/audio_if.h
===================================================================
RCS file: /OpenBSD/src/sys/dev/audio_if.h,v
retrieving revision 1.37
diff -u -p -r1.37 audio_if.h
--- sys/dev/audio_if.h  16 Feb 2022 06:21:18 -0000      1.37
+++ sys/dev/audio_if.h  21 Mar 2022 12:08:58 -0000
@@ -141,7 +141,7 @@ struct audio_hw_if {
 
 struct audio_attach_args {
        int     type;
-       void    *hwif;          /* either audio_hw_if * or midi_hw_if * */
+       const void *hwif;               /* either audio_hw_if * or midi_hw_if * 
*/
        void    *hdl;
        void    *cookie;
 };
@@ -152,7 +152,8 @@ struct audio_attach_args {
 #define AUDIODEV_TYPE_RADIO    4
 
 /* Attach the MI driver(s) to the MD driver. */
-struct device *audio_attach_mi(struct audio_hw_if *, void *, void *, struct 
device *);
+struct device *audio_attach_mi(const struct audio_hw_if *, void *, void *,
+                  struct device *);
 int           audioprint(void *, const char *);
 int           audio_blksz_bytes(int,
                   struct audio_params *, struct audio_params *, int);
Index: sys/dev/midi.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/midi.c,v
retrieving revision 1.52
diff -u -p -r1.52 midi.c
--- sys/dev/midi.c      30 Oct 2021 12:48:11 -0000      1.52
+++ sys/dev/midi.c      21 Mar 2022 12:08:58 -0000
@@ -549,7 +549,7 @@ midiattach(struct device *parent, struct
        struct midi_info          mi;
        struct midi_softc        *sc = (struct midi_softc *)self;
        struct audio_attach_args *sa = (struct audio_attach_args *)aux;
-       struct midi_hw_if        *hwif = sa->hwif;
+       const struct midi_hw_if  *hwif = sa->hwif;
        void                     *hdl = sa->hdl;
 
 #ifdef DIAGNOSTIC
@@ -645,7 +645,7 @@ midiprint(void *aux, const char *pnp)
 }
 
 struct device *
-midi_attach_mi(struct midi_hw_if *hwif, void *hdl, struct device *dev)
+midi_attach_mi(const struct midi_hw_if *hwif, void *hdl, struct device *dev)
 {
        struct audio_attach_args arg;
 
Index: sys/dev/midi_if.h
===================================================================
RCS file: /OpenBSD/src/sys/dev/midi_if.h,v
retrieving revision 1.9
diff -u -p -r1.9 midi_if.h
--- sys/dev/midi_if.h   16 May 2015 10:04:20 -0000      1.9
+++ sys/dev/midi_if.h   21 Mar 2022 12:08:58 -0000
@@ -52,6 +52,7 @@ struct midi_hw_if {
        int     (*ioctl)(void *, u_long, caddr_t, int, struct proc *);
 };
 
-struct device *midi_attach_mi(struct midi_hw_if *, void *, struct device *);
+struct device *midi_attach_mi(const struct midi_hw_if *, void *,
+           struct device *);
 
 #endif /* _SYS_DEV_MIDI_IF_H_ */
Index: sys/dev/midivar.h
===================================================================
RCS file: /OpenBSD/src/sys/dev/midivar.h,v
retrieving revision 1.12
diff -u -p -r1.12 midivar.h
--- sys/dev/midivar.h   30 Oct 2021 12:26:26 -0000      1.12
+++ sys/dev/midivar.h   21 Mar 2022 12:08:58 -0000
@@ -72,7 +72,7 @@ struct midi_buffer {
 
 struct midi_softc {
        struct device       dev;
-       struct midi_hw_if  *hw_if;
+       const struct midi_hw_if *hw_if;
        void               *hw_hdl;
        int                 isbusy;             /* concerns only the output */
        int                 flags;              /* open flags */
Index: sys/dev/radio.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/radio.c,v
retrieving revision 1.11
diff -u -p -r1.11 radio.c
--- sys/dev/radio.c     22 Sep 2016 00:47:19 -0000      1.11
+++ sys/dev/radio.c     21 Mar 2022 12:08:58 -0000
@@ -152,7 +152,7 @@ radioioctl(dev_t dev, u_long cmd, caddr_
  */
 
 struct device *
-radio_attach_mi(struct radio_hw_if *rhwp, void *hdlp, struct device *dev)
+radio_attach_mi(const struct radio_hw_if *rhwp, void *hdlp, struct device *dev)
 {
        struct audio_attach_args arg;
 
Index: sys/dev/radio_if.h
===================================================================
RCS file: /OpenBSD/src/sys/dev/radio_if.h,v
retrieving revision 1.3
diff -u -p -r1.3 radio_if.h
--- sys/dev/radio_if.h  30 May 2002 15:22:26 -0000      1.3
+++ sys/dev/radio_if.h  21 Mar 2022 12:08:58 -0000
@@ -47,6 +47,7 @@ struct radio_hw_if {
        int     (*search)(void *, int);
 };
 
-struct device  *radio_attach_mi(struct radio_hw_if *, void *, struct device *);
+struct device  *radio_attach_mi(const struct radio_hw_if *, void *,
+           struct device *);
 
 #endif /* _SYS_DEV_RADIO_IF_H */
Index: sys/dev/radiovar.h
===================================================================
RCS file: /OpenBSD/src/sys/dev/radiovar.h,v
retrieving revision 1.3
diff -u -p -r1.3 radiovar.h
--- sys/dev/radiovar.h  5 Jan 2002 02:23:03 -0000       1.3
+++ sys/dev/radiovar.h  21 Mar 2022 12:08:58 -0000
@@ -33,7 +33,7 @@ struct radio_softc {
        struct device   dev;
        void            *hw_hdl;        /* hardware driver handle */
        struct device   *sc_dev;        /* hardware device struct */
-       struct radio_hw_if *hw_if;      /* hardware interface */
+       const struct radio_hw_if *hw_if; /* hardware interface */
        char            sc_dying;       /* device detached */
 };
 
Index: sys/dev/video.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/video.c,v
retrieving revision 1.54
diff -u -p -r1.54 video.c
--- sys/dev/video.c     17 Feb 2021 17:21:58 -0000      1.54
+++ sys/dev/video.c     21 Mar 2022 12:08:58 -0000
@@ -46,7 +46,7 @@ struct video_softc {
        struct device            dev;
        void                    *hw_hdl;        /* hardware driver handle */
        struct device           *sc_dev;        /* hardware device struct */
-       struct video_hw_if      *hw_if;         /* hardware interface */
+       const struct video_hw_if *hw_if;        /* hardware interface */
        char                     sc_dying;      /* device detached */
        struct process          *sc_owner;      /* owner process */
        uint8_t                  sc_open;       /* device opened */
@@ -562,7 +562,7 @@ video_submatch(struct device *parent, vo
  * probed/attached to the hardware driver
  */
 struct device *
-video_attach_mi(struct video_hw_if *rhwp, void *hdlp, struct device *dev)
+video_attach_mi(const struct video_hw_if *rhwp, void *hdlp, struct device *dev)
 {
        struct video_attach_args arg;
 
Index: sys/dev/video_if.h
===================================================================
RCS file: /OpenBSD/src/sys/dev/video_if.h,v
retrieving revision 1.18
diff -u -p -r1.18 video_if.h
--- sys/dev/video_if.h  18 Oct 2014 08:01:34 -0000      1.18
+++ sys/dev/video_if.h  21 Mar 2022 12:08:58 -0000
@@ -63,10 +63,11 @@ struct video_hw_if {
 };
 
 struct video_attach_args {
-        void   *hwif;
+        const void *hwif;
         void   *hdl;
 };
 
-struct device  *video_attach_mi(struct video_hw_if *, void *, struct device *);
+struct device  *video_attach_mi(const struct video_hw_if *, void *,
+           struct device *);
 
 #endif /* _SYS_DEV_VIDEO_IF_H */
Index: sys/dev/fdt/es8316ac.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/fdt/es8316ac.c,v
retrieving revision 1.1
diff -u -p -r1.1 es8316ac.c
--- sys/dev/fdt/es8316ac.c      11 Jun 2020 00:04:28 -0000      1.1
+++ sys/dev/fdt/es8316ac.c      21 Mar 2022 12:08:58 -0000
@@ -132,7 +132,7 @@ int escodec_set_port(void *, mixer_ctrl_
 int escodec_get_port(void *, mixer_ctrl_t *);
 int escodec_query_devinfo(void *, mixer_devinfo_t *);
 
-struct audio_hw_if escodec_hw_if = {
+const struct audio_hw_if escodec_hw_if = {
        .set_port = escodec_set_port,
        .get_port = escodec_get_port,
        .query_devinfo = escodec_query_devinfo,
Index: sys/dev/fdt/graphaudio.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/fdt/graphaudio.c,v
retrieving revision 1.2
diff -u -p -r1.2 graphaudio.c
--- sys/dev/fdt/graphaudio.c    16 Feb 2022 06:21:18 -0000      1.2
+++ sys/dev/fdt/graphaudio.c    21 Mar 2022 12:08:58 -0000
@@ -65,7 +65,7 @@ int   graphaudio_trigger_input(void *, voi
 int    graphaudio_halt_output(void *);
 int    graphaudio_halt_input(void *);
 
-struct audio_hw_if graphaudio_hw_if = {
+const struct audio_hw_if graphaudio_hw_if = {
        .open = graphaudio_open,
        .close = graphaudio_close,
        .set_params = graphaudio_set_params,
@@ -206,7 +206,7 @@ graphaudio_open(void *cookie, int flags)
 {
        struct graphaudio_softc *sc = cookie;
        struct dai_device *dai;
-       struct audio_hw_if *hwif;
+       const struct audio_hw_if *hwif;
        int error;
 
        dai = sc->sc_dai_cpu;
@@ -237,7 +237,7 @@ graphaudio_close(void *cookie)
 {
        struct graphaudio_softc *sc = cookie;
        struct dai_device *dai;
-       struct audio_hw_if *hwif;
+       const struct audio_hw_if *hwif;
 
        dai = sc->sc_dai_codec;
        hwif = dai->dd_hw_if;
@@ -256,7 +256,7 @@ graphaudio_set_params(void *cookie, int 
 {
        struct graphaudio_softc *sc = cookie;
        struct dai_device *dai;
-       struct audio_hw_if *hwif;
+       const struct audio_hw_if *hwif;
        uint32_t rate;
        int error;
 
@@ -308,7 +308,7 @@ graphaudio_allocm(void *cookie, int dire
 {
        struct graphaudio_softc *sc = cookie;
        struct dai_device *dai = sc->sc_dai_cpu;
-       struct audio_hw_if *hwif = dai->dd_hw_if;
+       const struct audio_hw_if *hwif = dai->dd_hw_if;
 
        if (hwif->allocm)
                return hwif->allocm(dai->dd_cookie,
@@ -322,7 +322,7 @@ graphaudio_freem(void *cookie, void *add
 {
        struct graphaudio_softc *sc = cookie;
        struct dai_device *dai = sc->sc_dai_cpu;
-       struct audio_hw_if *hwif = dai->dd_hw_if;
+       const struct audio_hw_if *hwif = dai->dd_hw_if;
 
        if (hwif->freem)
                hwif->freem(dai->dd_cookie, addr, type);
@@ -333,7 +333,7 @@ graphaudio_set_port(void *cookie, mixer_
 {
        struct graphaudio_softc *sc = cookie;
        struct dai_device *dai = sc->sc_dai_codec;
-       struct audio_hw_if *hwif = dai->dd_hw_if;
+       const struct audio_hw_if *hwif = dai->dd_hw_if;
 
        if (hwif->set_port)
                return hwif->set_port(dai->dd_cookie, cp);
@@ -346,7 +346,7 @@ graphaudio_get_port(void *cookie, mixer_
 {
        struct graphaudio_softc *sc = cookie;
        struct dai_device *dai = sc->sc_dai_codec;
-       struct audio_hw_if *hwif = dai->dd_hw_if;
+       const struct audio_hw_if *hwif = dai->dd_hw_if;
 
        if (hwif->get_port)
                return hwif->get_port(dai->dd_cookie, cp);
@@ -359,7 +359,7 @@ graphaudio_query_devinfo(void *cookie, m
 {
        struct graphaudio_softc *sc = cookie;
        struct dai_device *dai = sc->sc_dai_codec;
-       struct audio_hw_if *hwif = dai->dd_hw_if;
+       const struct audio_hw_if *hwif = dai->dd_hw_if;
 
        if (hwif->query_devinfo)
                return hwif->query_devinfo(dai->dd_cookie, dip);
@@ -372,7 +372,7 @@ graphaudio_get_props(void *cookie)
 {
        struct graphaudio_softc *sc = cookie;
        struct dai_device *dai = sc->sc_dai_cpu;
-       struct audio_hw_if *hwif = dai->dd_hw_if;
+       const struct audio_hw_if *hwif = dai->dd_hw_if;
 
        if (hwif->get_props)
                return hwif->get_props(dai->dd_cookie);
@@ -385,7 +385,7 @@ graphaudio_round_blocksize(void *cookie,
 {
        struct graphaudio_softc *sc = cookie;
        struct dai_device *dai = sc->sc_dai_cpu;
-       struct audio_hw_if *hwif = dai->dd_hw_if;
+       const struct audio_hw_if *hwif = dai->dd_hw_if;
 
        if (hwif->round_blocksize)
                return hwif->round_blocksize(dai->dd_cookie, block);
@@ -398,7 +398,7 @@ graphaudio_round_buffersize(void *cookie
 {
        struct graphaudio_softc *sc = cookie;
        struct dai_device *dai = sc->sc_dai_cpu;
-       struct audio_hw_if *hwif = dai->dd_hw_if;
+       const struct audio_hw_if *hwif = dai->dd_hw_if;
 
        if (hwif->round_buffersize)
                return hwif->round_buffersize(dai->dd_cookie,
@@ -413,7 +413,7 @@ graphaudio_trigger_output(void *cookie, 
 {
        struct graphaudio_softc *sc = cookie;
        struct dai_device *dai;
-       struct audio_hw_if *hwif;
+       const struct audio_hw_if *hwif;
        int error;
 
        dai = sc->sc_dai_codec;
@@ -447,7 +447,7 @@ graphaudio_trigger_input(void *cookie, v
 {
        struct graphaudio_softc *sc = cookie;
        struct dai_device *dai;
-       struct audio_hw_if *hwif;
+       const struct audio_hw_if *hwif;
        int error;
 
        dai = sc->sc_dai_codec;
@@ -480,7 +480,7 @@ graphaudio_halt_output(void *cookie)
 {
        struct graphaudio_softc *sc = cookie;
        struct dai_device *dai;
-       struct audio_hw_if *hwif;
+       const struct audio_hw_if *hwif;
 
        dai = sc->sc_dai_codec;
        hwif = dai->dd_hw_if;
@@ -500,7 +500,7 @@ graphaudio_halt_input(void *cookie)
 {
        struct graphaudio_softc *sc = cookie;
        struct dai_device *dai;
-       struct audio_hw_if *hwif;
+       const struct audio_hw_if *hwif;
 
        dai = sc->sc_dai_codec;
        hwif = dai->dd_hw_if;
Index: sys/dev/fdt/rkiis.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/fdt/rkiis.c,v
retrieving revision 1.1
diff -u -p -r1.1 rkiis.c
--- sys/dev/fdt/rkiis.c 11 Jun 2020 00:02:08 -0000      1.1
+++ sys/dev/fdt/rkiis.c 21 Mar 2022 12:08:58 -0000
@@ -200,7 +200,7 @@ struct rkiis_softc {
        struct dai_device       sc_dai;
 };
 
-struct audio_hw_if rkiis_hw_if = {
+const struct audio_hw_if rkiis_hw_if = {
        .set_params = rkiis_set_params,
        .get_props = rkiis_get_props,
        .allocm = rkiis_allocm,
Index: sys/dev/fdt/simpleamp.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/fdt/simpleamp.c,v
retrieving revision 1.2
diff -u -p -r1.2 simpleamp.c
--- sys/dev/fdt/simpleamp.c     14 Feb 2022 00:53:40 -0000      1.2
+++ sys/dev/fdt/simpleamp.c     21 Mar 2022 12:08:58 -0000
@@ -46,7 +46,7 @@ struct simpleamp_softc {
        uint32_t                sc_vcc;
 };
 
-struct audio_hw_if simpleamp_hw_if = {
+const struct audio_hw_if simpleamp_hw_if = {
        .open = simpleamp_open,
        .close = simpleamp_close,
 };
Index: sys/dev/fdt/simpleaudio.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/fdt/simpleaudio.c,v
retrieving revision 1.3
diff -u -p -r1.3 simpleaudio.c
--- sys/dev/fdt/simpleaudio.c   16 Feb 2022 06:21:18 -0000      1.3
+++ sys/dev/fdt/simpleaudio.c   21 Mar 2022 12:08:58 -0000
@@ -67,7 +67,7 @@ int simpleaudio_trigger_input(void *, vo
 int simpleaudio_halt_output(void *);
 int simpleaudio_halt_input(void *);
 
-struct audio_hw_if simpleaudio_hw_if = {
+const struct audio_hw_if simpleaudio_hw_if = {
        .open = simpleaudio_open,
        .close = simpleaudio_close,
        .set_params = simpleaudio_set_params,
@@ -226,7 +226,7 @@ simpleaudio_open(void *cookie, int flags
 {
        struct simpleaudio_softc *sc = cookie;
        struct dai_device *dai;
-       struct audio_hw_if *hwif;
+       const struct audio_hw_if *hwif;
        int error, i;
 
        dai = sc->sc_dai_cpu;
@@ -269,7 +269,7 @@ simpleaudio_close(void *cookie)
 {
        struct simpleaudio_softc *sc = cookie;
        struct dai_device *dai;
-       struct audio_hw_if *hwif;
+       const struct audio_hw_if *hwif;
        int i;
 
        for (i = 0; i < sc->sc_dai_naux; i++) {
@@ -296,7 +296,7 @@ simpleaudio_set_params(void *cookie, int
 {
        struct simpleaudio_softc *sc = cookie;
        struct dai_device *dai;
-       struct audio_hw_if *hwif;
+       const struct audio_hw_if *hwif;
        uint32_t rate;
        int error;
 
@@ -348,7 +348,7 @@ simpleaudio_allocm(void *cookie, int dir
 {
        struct simpleaudio_softc *sc = cookie;
        struct dai_device *dai = sc->sc_dai_cpu;
-       struct audio_hw_if *hwif = dai->dd_hw_if;
+       const struct audio_hw_if *hwif = dai->dd_hw_if;
 
        if (hwif->allocm)
                return hwif->allocm(dai->dd_cookie,
@@ -362,7 +362,7 @@ simpleaudio_freem(void *cookie, void *ad
 {
        struct simpleaudio_softc *sc = cookie;
        struct dai_device *dai = sc->sc_dai_cpu;
-       struct audio_hw_if *hwif = dai->dd_hw_if;
+       const struct audio_hw_if *hwif = dai->dd_hw_if;
 
        if (hwif->freem)
                hwif->freem(dai->dd_cookie, addr, type);
@@ -373,7 +373,7 @@ simpleaudio_set_port(void *cookie, mixer
 {
        struct simpleaudio_softc *sc = cookie;
        struct dai_device *dai = sc->sc_dai_codec;
-       struct audio_hw_if *hwif = dai->dd_hw_if;
+       const struct audio_hw_if *hwif = dai->dd_hw_if;
 
        if (hwif->set_port)
                return hwif->set_port(dai->dd_cookie, cp);
@@ -386,7 +386,7 @@ simpleaudio_get_port(void *cookie, mixer
 {
        struct simpleaudio_softc *sc = cookie;
        struct dai_device *dai = sc->sc_dai_codec;
-       struct audio_hw_if *hwif = dai->dd_hw_if;
+       const struct audio_hw_if *hwif = dai->dd_hw_if;
 
        if (hwif->get_port)
                return hwif->get_port(dai->dd_cookie, cp);
@@ -399,7 +399,7 @@ simpleaudio_query_devinfo(void *cookie, 
 {
        struct simpleaudio_softc *sc = cookie;
        struct dai_device *dai = sc->sc_dai_codec;
-       struct audio_hw_if *hwif = dai->dd_hw_if;
+       const struct audio_hw_if *hwif = dai->dd_hw_if;
 
        if (hwif->query_devinfo)
                return hwif->query_devinfo(dai->dd_cookie, dip);
@@ -412,7 +412,7 @@ simpleaudio_get_props(void *cookie)
 {
        struct simpleaudio_softc *sc = cookie;
        struct dai_device *dai = sc->sc_dai_cpu;
-       struct audio_hw_if *hwif = dai->dd_hw_if;
+       const struct audio_hw_if *hwif = dai->dd_hw_if;
 
        if (hwif->get_props)
                return hwif->get_props(dai->dd_cookie);
@@ -425,7 +425,7 @@ simpleaudio_round_blocksize(void *cookie
 {
        struct simpleaudio_softc *sc = cookie;
        struct dai_device *dai = sc->sc_dai_cpu;
-       struct audio_hw_if *hwif = dai->dd_hw_if;
+       const struct audio_hw_if *hwif = dai->dd_hw_if;
 
        if (hwif->round_blocksize)
                return hwif->round_blocksize(dai->dd_cookie, block);
@@ -438,7 +438,7 @@ simpleaudio_round_buffersize(void *cooki
 {
        struct simpleaudio_softc *sc = cookie;
        struct dai_device *dai = sc->sc_dai_cpu;
-       struct audio_hw_if *hwif = dai->dd_hw_if;
+       const struct audio_hw_if *hwif = dai->dd_hw_if;
 
        if (hwif->round_buffersize)
                return hwif->round_buffersize(dai->dd_cookie,
@@ -453,7 +453,7 @@ simpleaudio_trigger_output(void *cookie,
 {
        struct simpleaudio_softc *sc = cookie;
        struct dai_device *dai;
-       struct audio_hw_if *hwif;
+       const struct audio_hw_if *hwif;
        int error, i;
 
        for (i = 0; i < sc->sc_dai_naux; i++) {
@@ -500,7 +500,7 @@ simpleaudio_trigger_input(void *cookie, 
 {
        struct simpleaudio_softc *sc = cookie;
        struct dai_device *dai;
-       struct audio_hw_if *hwif;
+       const struct audio_hw_if *hwif;
        int error, i;
 
        for (i = 0; i < sc->sc_dai_naux; i++) {
@@ -545,7 +545,7 @@ int simpleaudio_halt_output(void *cookie
 {
        struct simpleaudio_softc *sc = cookie;
        struct dai_device *dai;
-       struct audio_hw_if *hwif;
+       const struct audio_hw_if *hwif;
        int i;
 
        for (i = 0; i < sc->sc_dai_naux; i++) {
@@ -572,7 +572,7 @@ int simpleaudio_halt_input(void *cookie)
 {
        struct simpleaudio_softc *sc = cookie;
        struct dai_device *dai;
-       struct audio_hw_if *hwif;
+       const struct audio_hw_if *hwif;
        int i;
 
        for (i = 0; i < sc->sc_dai_naux; i++) {
Index: sys/dev/fdt/tascodec.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/fdt/tascodec.c,v
retrieving revision 1.2
diff -u -p -r1.2 tascodec.c
--- sys/dev/fdt/tascodec.c      14 Feb 2022 14:57:00 -0000      1.2
+++ sys/dev/fdt/tascodec.c      21 Mar 2022 12:08:58 -0000
@@ -82,7 +82,7 @@ int   tascodec_trigger_output(void *, void
            void (*)(void *), void *, struct audio_params *);
 int    tascodec_halt_output(void *);
 
-struct audio_hw_if tascodec_hw_if = {
+const struct audio_hw_if tascodec_hw_if = {
        .set_port = tascodec_set_port,
        .get_port = tascodec_get_port,
        .query_devinfo = tascodec_query_devinfo,
Index: sys/dev/ic/arcofi.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/ic/arcofi.c,v
retrieving revision 1.18
diff -u -p -r1.18 arcofi.c
--- sys/dev/ic/arcofi.c 16 Feb 2022 06:21:18 -0000      1.18
+++ sys/dev/ic/arcofi.c 21 Mar 2022 12:08:58 -0000
@@ -208,7 +208,7 @@ int arcofi_set_port(void *, mixer_ctrl_t
 int    arcofi_start_input(void *, void *, int, void (*)(void *), void *);
 int    arcofi_start_output(void *, void *, int, void (*)(void *), void *);
 
-/* const */ struct audio_hw_if arcofi_hw_if = {
+const struct audio_hw_if arcofi_hw_if = {
        .open = arcofi_open,
        .close = arcofi_close,
        .set_params = arcofi_set_params,
Index: sys/dev/ic/mpuvar.h
===================================================================
RCS file: /OpenBSD/src/sys/dev/ic/mpuvar.h,v
retrieving revision 1.6
diff -u -p -r1.6 mpuvar.h
--- sys/dev/ic/mpuvar.h 26 Jun 2008 05:42:15 -0000      1.6
+++ sys/dev/ic/mpuvar.h 21 Mar 2022 12:08:58 -0000
@@ -39,7 +39,7 @@ struct mpu_softc {
        void    *arg;                   /* arg for intr() */
 };
 
-extern struct midi_hw_if mpu_midi_hw_if;
+extern const struct midi_hw_if mpu_midi_hw_if;
 
 int    mpu_intr(void *);
 int    mpu_find(void *);
Index: sys/dev/isa/ess.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/isa/ess.c,v
retrieving revision 1.27
diff -u -p -r1.27 ess.c
--- sys/dev/isa/ess.c   16 Feb 2022 06:21:18 -0000      1.27
+++ sys/dev/isa/ess.c   21 Mar 2022 12:08:58 -0000
@@ -197,7 +197,7 @@ static char *essmodel[] = {
  * Define our interface to the higher level audio driver.
  */
 
-struct audio_hw_if ess_1788_hw_if = {
+const struct audio_hw_if ess_1788_hw_if = {
        ess_open,
        ess_1788_close,
        ess_set_params,
@@ -222,7 +222,7 @@ struct audio_hw_if ess_1788_hw_if = {
        ess_audio1_trigger_input
 };
 
-struct audio_hw_if ess_1888_hw_if = {
+const struct audio_hw_if ess_1888_hw_if = {
        ess_open,
        ess_1888_close,
        ess_set_params,
Index: sys/dev/isa/gus.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/isa/gus.c,v
retrieving revision 1.49
diff -u -p -r1.49 gus.c
--- sys/dev/isa/gus.c   16 Feb 2022 06:21:18 -0000      1.49
+++ sys/dev/isa/gus.c   21 Mar 2022 12:08:58 -0000
@@ -260,7 +260,7 @@ static const unsigned short gus_log_volu
 /*
  * Interface to higher level audio driver
  */
-struct audio_hw_if gus_hw_if = {
+const struct audio_hw_if gus_hw_if = {
        gusopen,
        gusclose,
        gus_set_params,
@@ -291,7 +291,7 @@ struct audio_hw_if gus_hw_if = {
        NULL
 };
 
-static struct audio_hw_if gusmax_hw_if = {
+const static struct audio_hw_if gusmax_hw_if = {
        gusmaxopen,
        gusmax_close,
        gusmax_set_params,
@@ -2082,7 +2082,6 @@ gus_init_cs4231(struct gus_softc *sc)
                sc->sc_codec.parent = sc;
                sc->sc_codec.sc_drq = sc->sc_recdrq;
                sc->sc_codec.sc_recdrq = sc->sc_drq;
-               gus_hw_if = gusmax_hw_if;
                /* enable line in and mic in the GUS mixer; the codec chip
                   will do the real mixing for them. */
                sc->sc_mixcontrol &= ~GUSMASK_LINE_IN; /* 0 enables. */
@@ -3397,8 +3396,12 @@ gus_subattach(struct gus_softc *sc, stru
         * Attach to the generic audio layer
         */
 
-       audio_attach_mi(&gus_hw_if, HAS_CODEC(sc) ? (void *)&sc->sc_codec :
-           (void *)sc, NULL, &sc->sc_dev);
+       if (HAS_CODEC(sc)) {
+               audio_attach_mi(&gusmax_hw_if, (void *)&sc->sc_codec, NULL,
+                   &sc->sc_dev);
+       } else {
+               audio_attach_mi(&gus_hw_if, (void *)sc, NULL, &sc->sc_dev);
+       }
 }
 
 /*
Index: sys/dev/isa/gusvar.h
===================================================================
RCS file: /OpenBSD/src/sys/dev/isa/gusvar.h,v
retrieving revision 1.10
diff -u -p -r1.10 gusvar.h
--- sys/dev/isa/gusvar.h        19 Sep 2016 06:46:44 -0000      1.10
+++ sys/dev/isa/gusvar.h        21 Mar 2022 12:08:58 -0000
@@ -406,7 +406,7 @@ extern const int gus_addrs;
 
 #define splgus splaudio
 
-extern struct audio_hw_if gus_hw_if;
+extern const struct audio_hw_if gus_hw_if;
 
 #define FLIP_REV       5               /* This rev has flipped mixer chans */
 
Index: sys/dev/isa/mpu401.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/isa/mpu401.c,v
retrieving revision 1.16
diff -u -p -r1.16 mpu401.c
--- sys/dev/isa/mpu401.c        7 Mar 2021 06:17:04 -0000       1.16
+++ sys/dev/isa/mpu401.c        21 Mar 2022 12:08:58 -0000
@@ -68,7 +68,7 @@ struct cfdriver mpu_cd = {
        NULL, "mpu", DV_DULL
 };
 
-struct midi_hw_if mpu_midi_hw_if = {
+const struct midi_hw_if mpu_midi_hw_if = {
        mpu_open,
        mpu_close,
        mpu_output,
Index: sys/dev/isa/pas.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/isa/pas.c,v
retrieving revision 1.31
diff -u -p -r1.31 pas.c
--- sys/dev/isa/pas.c   16 Feb 2022 06:21:18 -0000      1.31
+++ sys/dev/isa/pas.c   21 Mar 2022 12:08:58 -0000
@@ -108,7 +108,7 @@ void        pasconf(int, int, int, int);
  * Define our interface to the higher level audio driver.
  */
 
-struct audio_hw_if pas_hw_if = {
+const struct audio_hw_if pas_hw_if = {
        sbdsp_open,
        sbdsp_close,
        sbdsp_set_params,
Index: sys/dev/isa/sb.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/isa/sb.c,v
retrieving revision 1.31
diff -u -p -r1.31 sb.c
--- sys/dev/isa/sb.c    16 Feb 2022 06:21:18 -0000      1.31
+++ sys/dev/isa/sb.c    21 Mar 2022 12:08:58 -0000
@@ -70,7 +70,7 @@ void  sb_mpu401_close(void *);
 int    sb_mpu401_output(void *, int);
 void   sb_mpu401_getinfo(void *, struct midi_info *);
 
-struct midi_hw_if sb_midi_hw_if = {
+const struct midi_hw_if sb_midi_hw_if = {
        sbdsp_midi_open,
        sbdsp_midi_close,
        sbdsp_midi_output,
@@ -79,7 +79,7 @@ struct midi_hw_if sb_midi_hw_if = {
        0,                      /* ioctl */
 };
 
-struct midi_hw_if sb_mpu401_hw_if = {
+const struct midi_hw_if sb_mpu401_hw_if = {
        sb_mpu401_open,
        sb_mpu401_close,
        sb_mpu401_output,
@@ -93,7 +93,7 @@ struct midi_hw_if sb_mpu401_hw_if = {
  * Define our interface to the higher level audio driver.
  */
 
-struct audio_hw_if sb_hw_if = {
+const struct audio_hw_if sb_hw_if = {
        sbdsp_open,
        sbdsp_close,
        sbdsp_set_params,
@@ -243,7 +243,7 @@ sbattach(struct sbdsp_softc *sc)
 {
        struct audio_attach_args arg;
 #if NMIDI > 0
-       struct midi_hw_if *mhw = &sb_midi_hw_if;
+       const struct midi_hw_if *mhw = &sb_midi_hw_if;
 #endif
 
        sc->sc_ih = isa_intr_establish(sc->sc_ic, sc->sc_irq,
Index: sys/dev/ofw/ofw_misc.h
===================================================================
RCS file: /OpenBSD/src/sys/dev/ofw/ofw_misc.h,v
retrieving revision 1.23
diff -u -p -r1.23 ofw_misc.h
--- sys/dev/ofw/ofw_misc.h      2 Mar 2022 12:00:46 -0000       1.23
+++ sys/dev/ofw/ofw_misc.h      21 Mar 2022 12:08:58 -0000
@@ -191,7 +191,7 @@ void        *endpoint_get_cookie(struct endpoin
 struct dai_device {
        int     dd_node;
        void    *dd_cookie;
-       void    *dd_hw_if;
+       const void *dd_hw_if;
        int     (*dd_set_format)(void *, uint32_t, uint32_t, uint32_t);
        int     (*dd_set_sysclk)(void *, uint32_t);
 
Index: sys/dev/pci/auacer.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/pci/auacer.c,v
retrieving revision 1.24
diff -u -p -r1.24 auacer.c
--- sys/dev/pci/auacer.c        11 Mar 2022 18:00:45 -0000      1.24
+++ sys/dev/pci/auacer.c        21 Mar 2022 12:08:58 -0000
@@ -179,7 +179,7 @@ void        auacer_finish_attach(struct device 
 
 static void auacer_reset(struct auacer_softc *sc);
 
-struct audio_hw_if auacer_hw_if = {
+const struct audio_hw_if auacer_hw_if = {
        auacer_open,
        auacer_close,
        auacer_set_params,
Index: sys/dev/pci/auglx.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/pci/auglx.c,v
retrieving revision 1.19
diff -u -p -r1.19 auglx.c
--- sys/dev/pci/auglx.c 11 Mar 2022 18:00:45 -0000      1.19
+++ sys/dev/pci/auglx.c 21 Mar 2022 12:08:58 -0000
@@ -234,7 +234,7 @@ void auglx_free_prd(struct auglx_softc *
 int auglx_allocmem(struct auglx_softc *, size_t, size_t, struct auglx_dma *);
 void auglx_freemem(struct auglx_softc *, struct auglx_dma *);
 
-struct audio_hw_if auglx_hw_if = {
+const struct audio_hw_if auglx_hw_if = {
        auglx_open,
        auglx_close,
        auglx_set_params,
Index: sys/dev/pci/auich.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/pci/auich.c,v
retrieving revision 1.115
diff -u -p -r1.115 auich.c
--- sys/dev/pci/auich.c 11 Mar 2022 18:00:45 -0000      1.115
+++ sys/dev/pci/auich.c 21 Mar 2022 12:08:58 -0000
@@ -315,7 +315,7 @@ void auich_freemem(struct auich_softc *,
 
 void auich_resume(struct auich_softc *);
 
-struct audio_hw_if auich_hw_if = {
+const struct audio_hw_if auich_hw_if = {
        auich_open,
        auich_close,
        auich_set_params,
Index: sys/dev/pci/auixp.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/pci/auixp.c,v
retrieving revision 1.47
diff -u -p -r1.47 auixp.c
--- sys/dev/pci/auixp.c 11 Mar 2022 18:00:45 -0000      1.47
+++ sys/dev/pci/auixp.c 21 Mar 2022 12:08:58 -0000
@@ -154,7 +154,7 @@ void        auixp_update_busbusy(struct auixp_s
 #define DPRINTF(x)
 #endif
 
-struct audio_hw_if auixp_hw_if = {
+const struct audio_hw_if auixp_hw_if = {
        auixp_open,
        auixp_close,
        auixp_set_params,
Index: sys/dev/pci/autri.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/pci/autri.c,v
retrieving revision 1.46
diff -u -p -r1.46 autri.c
--- sys/dev/pci/autri.c 11 Mar 2022 18:00:45 -0000      1.46
+++ sys/dev/pci/autri.c 21 Mar 2022 12:08:58 -0000
@@ -139,7 +139,7 @@ int autri_query_devinfo(void *addr, mixe
 
 int    autri_get_portnum_by_name(struct autri_softc *, char *, char *, char *);
 
-struct audio_hw_if autri_hw_if = {
+const struct audio_hw_if autri_hw_if = {
        autri_open,
        autri_close,
        autri_set_params,
@@ -171,7 +171,7 @@ int autri_midi_open(void *, int, void (*
                           void (*)(void *), void *);
 int    autri_midi_output(void *, int);
 
-struct midi_hw_if autri_midi_hw_if = {
+const struct midi_hw_if autri_midi_hw_if = {
        autri_midi_open,
        autri_midi_close,
        autri_midi_output,
Index: sys/dev/pci/auvia.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/pci/auvia.c,v
retrieving revision 1.62
diff -u -p -r1.62 auvia.c
--- sys/dev/pci/auvia.c 11 Mar 2022 18:00:45 -0000      1.62
+++ sys/dev/pci/auvia.c 21 Mar 2022 12:08:58 -0000
@@ -178,7 +178,7 @@ const struct cfattach auvia_ca = {
 
 #define TIMEOUT        50
 
-struct audio_hw_if auvia_hw_if = {
+const struct audio_hw_if auvia_hw_if = {
        auvia_open,
        auvia_close,
        auvia_set_params,
Index: sys/dev/pci/azalia.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/pci/azalia.c,v
retrieving revision 1.270
diff -u -p -r1.270 azalia.c
--- sys/dev/pci/azalia.c        11 Mar 2022 18:00:45 -0000      1.270
+++ sys/dev/pci/azalia.c        21 Mar 2022 12:08:58 -0000
@@ -289,7 +289,7 @@ struct cfdriver azalia_cd = {
        NULL, "azalia", DV_DULL, CD_SKIPHIBERNATE
 };
 
-struct audio_hw_if azalia_hw_if = {
+const struct audio_hw_if azalia_hw_if = {
        azalia_open,
        azalia_close,
        azalia_set_params,
Index: sys/dev/pci/cmpci.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/pci/cmpci.c,v
retrieving revision 1.48
diff -u -p -r1.48 cmpci.c
--- sys/dev/pci/cmpci.c 11 Mar 2022 18:00:45 -0000      1.48
+++ sys/dev/pci/cmpci.c 21 Mar 2022 12:08:58 -0000
@@ -149,7 +149,7 @@ int cmpci_trigger_input(void *, void *, 
                                    void (*)(void *), void *,
                                    struct audio_params *);
 
-struct audio_hw_if cmpci_hw_if = {
+const struct audio_hw_if cmpci_hw_if = {
        cmpci_open,             /* open */
        cmpci_close,            /* close */
        cmpci_set_params,       /* set_params */
Index: sys/dev/pci/cs4280.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/pci/cs4280.c,v
retrieving revision 1.56
diff -u -p -r1.56 cs4280.c
--- sys/dev/pci/cs4280.c        11 Mar 2022 18:00:45 -0000      1.56
+++ sys/dev/pci/cs4280.c        21 Mar 2022 12:08:58 -0000
@@ -233,7 +233,7 @@ int cs4280_midi_open(void *, int, void (
 int    cs4280_midi_output(void *, int);
 #endif
 
-struct audio_hw_if cs4280_hw_if = {
+const struct audio_hw_if cs4280_hw_if = {
        cs4280_open,
        cs4280_close,
        cs4280_set_params,
@@ -259,7 +259,7 @@ struct audio_hw_if cs4280_hw_if = {
 };
 
 #if NMIDI > 0
-struct midi_hw_if cs4280_midi_hw_if = {
+const struct midi_hw_if cs4280_midi_hw_if = {
        cs4280_midi_open,
        cs4280_midi_close,
        cs4280_midi_output,
Index: sys/dev/pci/cs4281.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/pci/cs4281.c,v
retrieving revision 1.41
diff -u -p -r1.41 cs4281.c
--- sys/dev/pci/cs4281.c        11 Mar 2022 18:00:45 -0000      1.41
+++ sys/dev/pci/cs4281.c        21 Mar 2022 12:08:58 -0000
@@ -194,7 +194,7 @@ int cs4281_debug = 5;
 #define DPRINTFN(n,x)
 #endif
 
-struct audio_hw_if cs4281_hw_if = {
+const struct audio_hw_if cs4281_hw_if = {
        cs4281_open,
        cs4281_close,
        cs4281_set_params,
@@ -227,7 +227,7 @@ int cs4281_midi_open(void *, int, void (
                     void (*)(void *), void *);
 int cs4281_midi_output(void *, int);
 
-struct midi_hw_if cs4281_midi_hw_if = {
+const struct midi_hw_if cs4281_midi_hw_if = {
        cs4281_midi_open,
        cs4281_midi_close,
        cs4281_midi_output,
Index: sys/dev/pci/eap.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/pci/eap.c,v
retrieving revision 1.60
diff -u -p -r1.60 eap.c
--- sys/dev/pci/eap.c   11 Mar 2022 18:00:45 -0000      1.60
+++ sys/dev/pci/eap.c   21 Mar 2022 12:08:58 -0000
@@ -194,7 +194,7 @@ int eap_midi_open(void *, int, void (*)(
 int    eap_midi_output(void *, int);
 #endif
 
-struct audio_hw_if eap1370_hw_if = {
+const struct audio_hw_if eap1370_hw_if = {
        eap_open,
        eap_close,
        eap_set_params,
@@ -219,7 +219,7 @@ struct audio_hw_if eap1370_hw_if = {
        eap_trigger_input
 };
 
-struct audio_hw_if eap1371_hw_if = {
+const struct audio_hw_if eap1371_hw_if = {
        eap_open,
        eap_close,
        eap_set_params,
@@ -245,7 +245,7 @@ struct audio_hw_if eap1371_hw_if = {
 };
 
 #if NMIDI > 0
-struct midi_hw_if eap_midi_hw_if = {
+const struct midi_hw_if eap_midi_hw_if = {
        eap_midi_open,
        eap_midi_close,
        eap_midi_output,
@@ -433,7 +433,7 @@ eap_attach(struct device *parent, struct
        struct eap_softc *sc = (struct eap_softc *)self;
        struct pci_attach_args *pa = (struct pci_attach_args *)aux;
        pci_chipset_tag_t pc = pa->pa_pc;
-       struct audio_hw_if *eap_hw_if;
+       const struct audio_hw_if *eap_hw_if;
        char const *intrstr;
        pci_intr_handle_t ih;
        mixer_ctrl_t ctl;
Index: sys/dev/pci/emuxki.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/pci/emuxki.c,v
retrieving revision 1.57
diff -u -p -r1.57 emuxki.c
--- sys/dev/pci/emuxki.c        11 Mar 2022 18:00:45 -0000      1.57
+++ sys/dev/pci/emuxki.c        21 Mar 2022 12:08:59 -0000
@@ -211,7 +211,7 @@ const struct cfattach emu_ca = {
        emuxki_activate
 };
 
-struct audio_hw_if emuxki_hw_if = {
+const struct audio_hw_if emuxki_hw_if = {
        emuxki_open,
        emuxki_close,
        emuxki_set_params,
Index: sys/dev/pci/envy.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/pci/envy.c,v
retrieving revision 1.83
diff -u -p -r1.83 envy.c
--- sys/dev/pci/envy.c  11 Mar 2022 18:00:45 -0000      1.83
+++ sys/dev/pci/envy.c  21 Mar 2022 12:08:59 -0000
@@ -179,7 +179,7 @@ struct cfdriver envy_cd = {
        NULL, "envy", DV_DULL
 };
 
-struct audio_hw_if envy_hw_if = {
+const struct audio_hw_if envy_hw_if = {
        envy_open,              /* open */
        envy_close,             /* close */
        envy_set_params,        /* set_params */
@@ -205,7 +205,7 @@ struct audio_hw_if envy_hw_if = {
 };
 
 #if NMIDI > 0
-struct midi_hw_if envy_midi_hw_if = {
+const struct midi_hw_if envy_midi_hw_if = {
        envy_midi_open,
        envy_midi_close,
        envy_midi_output,
Index: sys/dev/pci/esa.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/pci/esa.c,v
retrieving revision 1.37
diff -u -p -r1.37 esa.c
--- sys/dev/pci/esa.c   11 Mar 2022 18:00:45 -0000      1.37
+++ sys/dev/pci/esa.c   21 Mar 2022 12:08:59 -0000
@@ -151,7 +151,7 @@ void                esa_remove_list(struct esa_voice *
 void           esa_suspend(struct esa_softc *);
 void           esa_resume(struct esa_softc *);
 
-struct audio_hw_if esa_hw_if = {
+const struct audio_hw_if esa_hw_if = {
        esa_open,
        esa_close,
        esa_set_params,
Index: sys/dev/pci/eso.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/pci/eso.c,v
retrieving revision 1.49
diff -u -p -r1.49 eso.c
--- sys/dev/pci/eso.c   11 Mar 2022 18:00:45 -0000      1.49
+++ sys/dev/pci/eso.c   21 Mar 2022 12:08:59 -0000
@@ -123,7 +123,7 @@ int eso_trigger_input(void *, void *, vo
                    void (*)(void *), void *, struct audio_params *);
 void   eso_setup(struct eso_softc *, int, int);
 
-struct audio_hw_if eso_hw_if = {
+const struct audio_hw_if eso_hw_if = {
        eso_open,
        eso_close,
        eso_set_params,
Index: sys/dev/pci/fms.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/pci/fms.c,v
retrieving revision 1.32
diff -u -p -r1.32 fms.c
--- sys/dev/pci/fms.c   11 Mar 2022 18:00:45 -0000      1.32
+++ sys/dev/pci/fms.c   21 Mar 2022 12:08:59 -0000
@@ -99,7 +99,7 @@ const struct cfattach fms_ca = {
        sizeof (struct fms_softc), fms_match, fms_attach
 };
 
-struct audio_hw_if fms_hw_if = {
+const struct audio_hw_if fms_hw_if = {
        fms_open,
        fms_close,
        fms_set_params,
Index: sys/dev/pci/fmsradio.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/pci/fmsradio.c,v
retrieving revision 1.7
diff -u -p -r1.7 fmsradio.c
--- sys/dev/pci/fmsradio.c      23 Nov 2021 00:17:59 -0000      1.7
+++ sys/dev/pci/fmsradio.c      21 Mar 2022 12:08:59 -0000
@@ -136,7 +136,7 @@ int fmsradio_get_info(void *, struct rad
 int    fmsradio_set_info(void *, struct radio_info *);
 int    fmsradio_search(void *, int);
 
-struct radio_hw_if fmsradio_hw_if = {
+const struct radio_hw_if fmsradio_hw_if = {
        NULL,   /* open */
        NULL,   /* close */
        fmsradio_get_info,
Index: sys/dev/pci/maestro.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/pci/maestro.c,v
retrieving revision 1.45
diff -u -p -r1.45 maestro.c
--- sys/dev/pci/maestro.c       11 Mar 2022 18:00:50 -0000      1.45
+++ sys/dev/pci/maestro.c       21 Mar 2022 12:08:59 -0000
@@ -527,7 +527,7 @@ const struct cfattach maestro_ca = {
        NULL, maestro_activate
 };
 
-struct audio_hw_if maestro_hw_if = {
+const struct audio_hw_if maestro_hw_if = {
        maestro_open,
        maestro_close,
        maestro_set_params,
Index: sys/dev/pci/neo.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/pci/neo.c,v
retrieving revision 1.36
diff -u -p -r1.36 neo.c
--- sys/dev/pci/neo.c   11 Mar 2022 18:00:51 -0000      1.36
+++ sys/dev/pci/neo.c   21 Mar 2022 12:08:59 -0000
@@ -237,7 +237,7 @@ static int samplerates[9] = {
 
 /* -------------------------------------------------------------------- */
 
-struct audio_hw_if neo_hw_if = {
+const struct audio_hw_if neo_hw_if = {
        neo_open,
        neo_close,
        neo_set_params,
Index: sys/dev/pci/sv.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/pci/sv.c,v
retrieving revision 1.39
diff -u -p -r1.39 sv.c
--- sys/dev/pci/sv.c    11 Mar 2022 18:00:51 -0000      1.39
+++ sys/dev/pci/sv.c    21 Mar 2022 12:08:59 -0000
@@ -146,7 +146,7 @@ int sv_get_props(void *);
 
 void    sv_dumpregs(struct sv_softc *sc);
 
-struct audio_hw_if sv_hw_if = {
+const struct audio_hw_if sv_hw_if = {
        sv_open,
        sv_close,
        sv_set_params,
Index: sys/dev/pci/yds.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/pci/yds.c,v
retrieving revision 1.58
diff -u -p -r1.58 yds.c
--- sys/dev/pci/yds.c   11 Mar 2022 18:00:52 -0000      1.58
+++ sys/dev/pci/yds.c   21 Mar 2022 12:08:59 -0000
@@ -199,7 +199,7 @@ static void yds_dump_play_slot(struct yd
 #define        YDS_DUMP_PLAY_SLOT(n,sc,bank)
 #endif /* AUDIO_DEBUG */
 
-static struct audio_hw_if yds_hw_if = {
+const static struct audio_hw_if yds_hw_if = {
        yds_open,
        yds_close,
        yds_set_params,
Index: sys/dev/pci/bktr/bktr_os.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/pci/bktr/bktr_os.c,v
retrieving revision 1.35
diff -u -p -r1.35 bktr_os.c
--- sys/dev/pci/bktr/bktr_os.c  11 Mar 2022 18:00:53 -0000      1.35
+++ sys/dev/pci/bktr/bktr_os.c  21 Mar 2022 12:08:59 -0000
@@ -123,7 +123,7 @@ struct cfdriver bktr_cd = {
 int    bktr_get_info(void *, struct radio_info *);
 int    bktr_set_info(void *, struct radio_info *);
 
-struct radio_hw_if bktr_hw_if = {
+const struct radio_hw_if bktr_hw_if = {
        NULL,   /* open */
        NULL,   /* close */
        bktr_get_info,
Index: sys/dev/sbus/cs4231.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/sbus/cs4231.c,v
retrieving revision 1.40
diff -u -p -r1.40 cs4231.c
--- sys/dev/sbus/cs4231.c       13 Mar 2022 13:34:54 -0000      1.40
+++ sys/dev/sbus/cs4231.c       21 Mar 2022 12:08:59 -0000
@@ -151,7 +151,7 @@ int cs4231_trigger_output(void *, void *
 int    cs4231_trigger_input(void *, void *, void *, int,
     void (*)(void *), void *, struct audio_params *);
 
-struct audio_hw_if cs4231_sa_hw_if = {
+const struct audio_hw_if cs4231_sa_hw_if = {
        cs4231_open,
        cs4231_close,
        cs4231_set_params,
Index: sys/dev/tc/bba.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/tc/bba.c,v
retrieving revision 1.8
diff -u -p -r1.8 bba.c
--- sys/dev/tc/bba.c    16 Feb 2022 06:21:19 -0000      1.8
+++ sys/dev/tc/bba.c    21 Mar 2022 12:08:59 -0000
@@ -152,7 +152,7 @@ int bba_trigger_output(void *, void *, v
 int    bba_trigger_input(void *, void *, void *, int,
            void (*)(void *), void *, struct audio_params *);
 
-struct audio_hw_if bba_hw_if = {
+const struct audio_hw_if bba_hw_if = {
        am7930_open,
        am7930_close,
        am7930_set_params,
Index: sys/dev/usb/uaudio.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/usb/uaudio.c,v
retrieving revision 1.168
diff -u -p -r1.168 uaudio.c
--- sys/dev/usb/uaudio.c        21 Feb 2022 14:21:58 -0000      1.168
+++ sys/dev/usb/uaudio.c        21 Mar 2022 12:08:59 -0000
@@ -468,7 +468,7 @@ const struct cfattach uaudio_ca = {
        sizeof(struct uaudio_softc), uaudio_match, uaudio_attach, uaudio_detach
 };
 
-struct audio_hw_if uaudio_hw_if = {
+const struct audio_hw_if uaudio_hw_if = {
        uaudio_open,            /* open */
        uaudio_close,           /* close */
        uaudio_set_params,      /* set_params */
Index: sys/dev/usb/udsbr.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/usb/udsbr.c,v
retrieving revision 1.27
diff -u -p -r1.27 udsbr.c
--- sys/dev/usb/udsbr.c 6 Nov 2016 12:58:01 -0000       1.27
+++ sys/dev/usb/udsbr.c 21 Mar 2022 12:08:59 -0000
@@ -65,7 +65,7 @@ int   udsbrdebug = 0;
 int     udsbr_get_info(void *, struct radio_info *);
 int     udsbr_set_info(void *, struct radio_info *);
 
-struct radio_hw_if udsbr_hw_if = {
+const struct radio_hw_if udsbr_hw_if = {
        NULL, /* open */
        NULL, /* close */
        udsbr_get_info,
Index: sys/dev/usb/umidi.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/usb/umidi.c,v
retrieving revision 1.54
diff -u -p -r1.54 umidi.c
--- sys/dev/usb/umidi.c 31 Jul 2020 10:49:33 -0000      1.54
+++ sys/dev/usb/umidi.c 21 Mar 2022 12:08:59 -0000
@@ -116,7 +116,7 @@ static void out_intr(struct usbd_xfer *,
 static int out_build_packet(int, struct umidi_packet *, uByte, u_char *);
 
 
-struct midi_hw_if umidi_hw_if = {
+const struct midi_hw_if umidi_hw_if = {
        umidi_open,
        umidi_close,
        umidi_output,
Index: sys/dev/usb/utvfu.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/usb/utvfu.c,v
retrieving revision 1.16
diff -u -p -r1.16 utvfu.c
--- sys/dev/usb/utvfu.c 16 Feb 2022 06:21:19 -0000      1.16
+++ sys/dev/usb/utvfu.c 21 Mar 2022 12:08:59 -0000
@@ -813,7 +813,7 @@ const struct cfattach utvfu_ca = {
        NULL
 };
 
-struct video_hw_if utvfu_vid_hw_if = {
+const struct video_hw_if utvfu_vid_hw_if = {
        utvfu_open,             /* open */
        utvfu_close,            /* close */
        utvfu_querycap,         /* VIDIOC_QUERYCAP */
@@ -842,7 +842,7 @@ struct video_hw_if utvfu_vid_hw_if = {
        utvfu_start_read        /* start stream for read */
 };
 
-struct audio_hw_if utvfu_au_hw_if = {
+const struct audio_hw_if utvfu_au_hw_if = {
        utvfu_audio_open,               /* open hardware */
        utvfu_audio_close,              /* close hardware */
        utvfu_audio_set_params,
Index: sys/dev/usb/uvideo.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/usb/uvideo.c,v
retrieving revision 1.215
diff -u -p -r1.215 uvideo.c
--- sys/dev/usb/uvideo.c        9 Jan 2022 05:43:02 -0000       1.215
+++ sys/dev/usb/uvideo.c        21 Mar 2022 12:08:59 -0000
@@ -271,7 +271,7 @@ const struct cfattach uvideo_ca = {
        sizeof(struct uvideo_softc), uvideo_match, uvideo_attach, uvideo_detach
 };
 
-struct video_hw_if uvideo_hw_if = {
+const struct video_hw_if uvideo_hw_if = {
        uvideo_open,            /* open */
        uvideo_close,           /* close */
        uvideo_querycap,        /* VIDIOC_QUERYCAP */

Reply via email to