From 2f0600b639777cbc1c0ae3f7bbbc982b0838e706 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sat, 24 May 2008 00:02:49 +0100 Subject: vx: treat firmware data as const Signed-off-by: David Woodhouse --- sound/drivers/vx/vx_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound/drivers') diff --git a/sound/drivers/vx/vx_core.c b/sound/drivers/vx/vx_core.c index 99538862e34..585af2eb143 100644 --- a/sound/drivers/vx/vx_core.c +++ b/sound/drivers/vx/vx_core.c @@ -453,7 +453,7 @@ int snd_vx_load_boot_image(struct vx_core *chip, const struct firmware *boot) vx_outb(chip, TXM, 0); vx_outb(chip, TXL, 0); } else { - unsigned char *image = boot->data + i; + const unsigned char *image = boot->data + i; if (vx_wait_isr_bit(chip, ISR_TX_EMPTY) < 0) { snd_printk(KERN_ERR "dsp boot failed at %d\n", i); return -EIO; @@ -671,7 +671,7 @@ int snd_vx_dsp_load(struct vx_core *chip, const struct firmware *dsp) unsigned int i; int err; unsigned int csum = 0; - unsigned char *image, *cptr; + const unsigned char *image, *cptr; snd_assert(dsp->size % 3 == 0, return -EINVAL); -- cgit v1.2.3 From b561c74ae2832d32cc189ecd82863d31151cdcb5 Mon Sep 17 00:00:00 2001 From: David Howells Date: Tue, 8 Jul 2008 17:36:45 +0100 Subject: Fix a const pointer usage warning in the Digigram VX soundcard driver Fix a const pointer usage warning in the Digigram VX soundcard driver. A const pointer is being passed to copy_from_user() to load the firmware into. This is okay in this case because the function has allocated the firmware struct itself, but the const qualifier will be part of the firmware struct - so the patch casts the const away. Signed-off-by: David Howells Signed-off-by: David Woodhouse --- sound/drivers/vx/vx_hwdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/drivers') diff --git a/sound/drivers/vx/vx_hwdep.c b/sound/drivers/vx/vx_hwdep.c index 1dfe6948e6f..efd22e92bce 100644 --- a/sound/drivers/vx/vx_hwdep.c +++ b/sound/drivers/vx/vx_hwdep.c @@ -183,7 +183,7 @@ static int vx_hwdep_dsp_load(struct snd_hwdep *hw, kfree(fw); return -ENOMEM; } - if (copy_from_user(fw->data, dsp->image, dsp->length)) { + if (copy_from_user((void *)fw->data, dsp->image, dsp->length)) { free_fw(fw); return -EFAULT; } -- cgit v1.2.3