Commit 199a4a8c authored by Jaroslav Kysela's avatar Jaroslav Kysela

[ALSA] [SPARSE] Add __user pointer casts

Wavefront drivers
Added __user pointer casts to sys_*() arguments
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 41cbf69f
...@@ -1943,7 +1943,7 @@ wavefront_download_firmware (snd_wavefront_t *dev, char *path) ...@@ -1943,7 +1943,7 @@ wavefront_download_firmware (snd_wavefront_t *dev, char *path)
fs = get_fs(); fs = get_fs();
set_fs (get_ds()); set_fs (get_ds());
if ((fd = sys_open (path, 0, 0)) < 0) { if ((fd = sys_open ((char __user *) path, 0, 0)) < 0) {
snd_printk ("Unable to load \"%s\".\n", snd_printk ("Unable to load \"%s\".\n",
path); path);
return 1; return 1;
...@@ -1952,7 +1952,7 @@ wavefront_download_firmware (snd_wavefront_t *dev, char *path) ...@@ -1952,7 +1952,7 @@ wavefront_download_firmware (snd_wavefront_t *dev, char *path)
while (1) { while (1) {
int x; int x;
if ((x = sys_read (fd, &section_length, sizeof (section_length))) != if ((x = sys_read (fd, (char __user *) &section_length, sizeof (section_length))) !=
sizeof (section_length)) { sizeof (section_length)) {
snd_printk ("firmware read error.\n"); snd_printk ("firmware read error.\n");
goto failure; goto failure;
...@@ -1968,7 +1968,7 @@ wavefront_download_firmware (snd_wavefront_t *dev, char *path) ...@@ -1968,7 +1968,7 @@ wavefront_download_firmware (snd_wavefront_t *dev, char *path)
goto failure; goto failure;
} }
if (sys_read (fd, section, section_length) != section_length) { if (sys_read (fd, (char __user *) section, section_length) != section_length) {
snd_printk ("firmware section " snd_printk ("firmware section "
"read error.\n"); "read error.\n");
goto failure; goto failure;
......
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