Commit 7f034787 authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update - Jaroslav Kysela <perex@suse.cz>

Sound Scape driver
Chris Rankin <rankincj@yahoo.com> - use #define rather than value for the microcode size
parent 0d7e91a2
...@@ -8,9 +8,11 @@ struct sscape_bootblock ...@@ -8,9 +8,11 @@ struct sscape_bootblock
unsigned version; unsigned version;
}; };
#define SSCAPE_MICROCODE_SIZE 65536
struct sscape_microcode struct sscape_microcode
{ {
unsigned char *code; /* 65536 chars */ unsigned char *code;
}; };
#define SND_SSCAPE_LOAD_BOOTB _IOWR('P', 100, struct sscape_bootblock) #define SND_SSCAPE_LOAD_BOOTB _IOWR('P', 100, struct sscape_bootblock)
......
...@@ -616,10 +616,10 @@ static int sscape_upload_microcode(struct soundscape *sscape, ...@@ -616,10 +616,10 @@ static int sscape_upload_microcode(struct soundscape *sscape,
*/ */
if (get_user(code, &mc->code)) if (get_user(code, &mc->code))
return -EFAULT; return -EFAULT;
if ((err = verify_area(VERIFY_READ, code, 65536)) != 0) if ((err = verify_area(VERIFY_READ, code, SSCAPE_MICROCODE_SIZE)) != 0)
return err; return err;
if ((ret = upload_dma_data(sscape, code, 65536)) == 0) { if ((ret = upload_dma_data(sscape, code, SSCAPE_MICROCODE_SIZE)) == 0) {
snd_printk(KERN_INFO "sscape: MIDI firmware loaded\n"); snd_printk(KERN_INFO "sscape: MIDI firmware loaded\n");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment