From b8d21807a1a479e0214a03069a88e3e93492b72d Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sat, 24 May 2008 00:02:28 +0100 Subject: pcxhr: treat firmware data as const Signed-off-by: David Woodhouse --- sound/pci/pcxhr/pcxhr_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound/pci/pcxhr') diff --git a/sound/pci/pcxhr/pcxhr_core.c b/sound/pci/pcxhr/pcxhr_core.c index 78aa81feaa4a..957e6afe94f1 100644 --- a/sound/pci/pcxhr/pcxhr_core.c +++ b/sound/pci/pcxhr/pcxhr_core.c @@ -269,7 +269,7 @@ int pcxhr_load_xilinx_binary(struct pcxhr_mgr *mgr, const struct firmware *xilin unsigned int chipsc; unsigned char data; unsigned char mask; - unsigned char *image; + const unsigned char *image; /* test first xilinx */ chipsc = PCXHR_INPL(mgr, PCXHR_PLX_CHIPSC); @@ -316,7 +316,7 @@ static int pcxhr_download_dsp(struct pcxhr_mgr *mgr, const struct firmware *dsp) int err; unsigned int i; unsigned int len; - unsigned char *data; + const unsigned char *data; unsigned char dummy; /* check the length of boot image */ snd_assert(dsp->size > 0, return -EINVAL); -- cgit v1.2.2 From 67852dc08c0782735d48ce1e2a6eb44cd02a6ff7 Mon Sep 17 00:00:00 2001 From: David Howells Date: Tue, 8 Jul 2008 17:45:58 +0100 Subject: Fix a const pointer usage warning in the Digigram pcxhr soundcard driver Fix a const pointer usage warning in the Digigram pcxhr compatible 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 is part of the firmware struct - so the patch casts the const away. Signed-off-by: David Howells Signed-off-by: David Woodhouse --- sound/pci/pcxhr/pcxhr_hwdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/pci/pcxhr') diff --git a/sound/pci/pcxhr/pcxhr_hwdep.c b/sound/pci/pcxhr/pcxhr_hwdep.c index e6a4bfbb91bb..d2f043278cf4 100644 --- a/sound/pci/pcxhr/pcxhr_hwdep.c +++ b/sound/pci/pcxhr/pcxhr_hwdep.c @@ -394,7 +394,7 @@ static int pcxhr_hwdep_dsp_load(struct snd_hwdep *hw, (unsigned long)fw.size); return -ENOMEM; } - if (copy_from_user(fw.data, dsp->image, dsp->length)) { + if (copy_from_user((void *)fw.data, dsp->image, dsp->length)) { vfree(fw.data); return -EFAULT; } -- cgit v1.2.2