bhyve: Make hda_ops function tables const

No functional change intended.

MFC after:	1 week
This commit is contained in:
Mark Johnston 2022-10-23 10:43:06 -04:00
parent 84633b9d52
commit 489392feb7
3 changed files with 6 additions and 6 deletions

View File

@ -465,7 +465,7 @@ hda_codec_init(struct hda_codec_inst *hci, const char *play,
static int static int
hda_codec_reset(struct hda_codec_inst *hci) hda_codec_reset(struct hda_codec_inst *hci)
{ {
struct hda_ops *hops = NULL; const struct hda_ops *hops = NULL;
struct hda_codec_softc *sc = NULL; struct hda_codec_softc *sc = NULL;
struct hda_codec_stream *st = NULL; struct hda_codec_stream *st = NULL;
int i; int i;
@ -500,8 +500,8 @@ hda_codec_reset(struct hda_codec_inst *hci)
static int static int
hda_codec_command(struct hda_codec_inst *hci, uint32_t cmd_data) hda_codec_command(struct hda_codec_inst *hci, uint32_t cmd_data)
{ {
const struct hda_ops *hops = NULL;
struct hda_codec_softc *sc = NULL; struct hda_codec_softc *sc = NULL;
struct hda_ops *hops = NULL;
uint8_t cad = 0, nid = 0; uint8_t cad = 0, nid = 0;
uint16_t verb = 0, payload = 0; uint16_t verb = 0, payload = 0;
uint32_t res = 0; uint32_t res = 0;
@ -677,9 +677,9 @@ hda_codec_audio_output_nid(struct hda_codec_softc *sc, uint16_t verb,
static void static void
hda_codec_audio_output_do_transfer(void *arg) hda_codec_audio_output_do_transfer(void *arg)
{ {
const struct hda_ops *hops = NULL;
struct hda_codec_softc *sc = (struct hda_codec_softc *)arg; struct hda_codec_softc *sc = (struct hda_codec_softc *)arg;
struct hda_codec_inst *hci = NULL; struct hda_codec_inst *hci = NULL;
struct hda_ops *hops = NULL;
struct hda_codec_stream *st = NULL; struct hda_codec_stream *st = NULL;
struct audio *aud = NULL; struct audio *aud = NULL;
int err; int err;
@ -738,9 +738,9 @@ hda_codec_audio_input_nid(struct hda_codec_softc *sc, uint16_t verb,
static void static void
hda_codec_audio_input_do_transfer(void *arg) hda_codec_audio_input_do_transfer(void *arg)
{ {
const struct hda_ops *hops = NULL;
struct hda_codec_softc *sc = (struct hda_codec_softc *)arg; struct hda_codec_softc *sc = (struct hda_codec_softc *)arg;
struct hda_codec_inst *hci = NULL; struct hda_codec_inst *hci = NULL;
struct hda_ops *hops = NULL;
struct hda_codec_stream *st = NULL; struct hda_codec_stream *st = NULL;
struct audio *aud = NULL; struct audio *aud = NULL;
int err; int err;

View File

@ -264,7 +264,7 @@ static const uint16_t hda_rirb_sizes[] = {
[HDAC_RIRBSIZE_RIRBSIZE_MASK] = 0, [HDAC_RIRBSIZE_RIRBSIZE_MASK] = 0,
}; };
static struct hda_ops hops = { static const struct hda_ops hops = {
.signal = hda_signal_state_change, .signal = hda_signal_state_change,
.response = hda_response, .response = hda_response,
.transfer = hda_transfer, .transfer = hda_transfer,

View File

@ -65,7 +65,7 @@ struct hda_codec_inst {
uint8_t cad; uint8_t cad;
struct hda_codec_class *codec; struct hda_codec_class *codec;
struct hda_softc *hda; struct hda_softc *hda;
struct hda_ops *hops; const struct hda_ops *hops;
void *priv; void *priv;
}; };