Fix a const pointer usage warning in the Digigram pcxhr soundcard driver
authorDavid Howells <dhowells@redhat.com>
Tue, 8 Jul 2008 16:45:58 +0000 (17:45 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 10 Jul 2008 13:28:52 +0000 (14:28 +0100)
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 <dhowells@redhat.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
sound/pci/pcxhr/pcxhr_hwdep.c

index e6a4bfbb91bb664ed933c3a8c95e286b5876ac83..d2f043278cf4f8a329affc0116d6d122f1f586ee 100644 (file)
@@ -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;
        }