From f8ae2d2919481817d2e942617c203fc792687c66 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 3 Jan 2020 09:16:46 +0100 Subject: ALSA: vx: Constify snd_vx_hardware and snd_vx_ops definitions Both snd_vx_hardware and snd_vx_ops are only referred without modification, hence they can be constified gracefully for further optimizations. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-31-tiwai@suse.de Signed-off-by: Takashi Iwai --- sound/pcmcia/vx/vxp_ops.c | 2 +- sound/pcmcia/vx/vxpocket.c | 4 ++-- sound/pcmcia/vx/vxpocket.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sound/pcmcia') diff --git a/sound/pcmcia/vx/vxp_ops.c b/sound/pcmcia/vx/vxp_ops.c index 447c6342eec8..f7cf707d315f 100644 --- a/sound/pcmcia/vx/vxp_ops.c +++ b/sound/pcmcia/vx/vxp_ops.c @@ -581,7 +581,7 @@ static void vxp_reset_board(struct vx_core *_chip, int cold_reset) * callbacks */ /* exported */ -struct snd_vx_ops snd_vxpocket_ops = { +const struct snd_vx_ops snd_vxpocket_ops = { .in8 = vxp_inb, .out8 = vxp_outb, .test_and_ack = vxp_test_and_ack, diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c index cad603ca0d93..afd30a90c807 100644 --- a/sound/pcmcia/vx/vxpocket.c +++ b/sound/pcmcia/vx/vxpocket.c @@ -82,7 +82,7 @@ static int snd_vxpocket_dev_free(struct snd_device *device) static const DECLARE_TLV_DB_SCALE(db_scale_old_vol, -11350, 50, 0); -static struct snd_vx_hardware vxpocket_hw = { +static const struct snd_vx_hardware vxpocket_hw = { .name = "VXPocket", .type = VX_TYPE_VXPOCKET, @@ -104,7 +104,7 @@ static struct snd_vx_hardware vxpocket_hw = { * UER, but only for the first two inputs and outputs. */ -static struct snd_vx_hardware vxp440_hw = { +static const struct snd_vx_hardware vxp440_hw = { .name = "VXPocket440", .type = VX_TYPE_VXP440, diff --git a/sound/pcmcia/vx/vxpocket.h b/sound/pcmcia/vx/vxpocket.h index 6dbd9f6bd2ff..bce616cc3aca 100644 --- a/sound/pcmcia/vx/vxpocket.h +++ b/sound/pcmcia/vx/vxpocket.h @@ -32,7 +32,7 @@ struct snd_vxpocket { #define to_vxpocket(x) container_of(x, struct snd_vxpocket, core) -extern struct snd_vx_ops snd_vxpocket_ops; +extern const struct snd_vx_ops snd_vxpocket_ops; void vx_set_mic_boost(struct vx_core *chip, int boost); void vx_set_mic_level(struct vx_core *chip, int level); -- cgit v1.2.3