ALSA: compress_core: Deconstify copy callback buffer
[deliverable/linux.git] / sound / core / compress_offload.c
index 1f69863a83d29bc1706ea6bd5b8b594faccd6973..52ca4cce1462551b6c0649934dd21113d4ea31bd 100644 (file)
@@ -272,10 +272,12 @@ static ssize_t snd_compr_write(struct file *f, const char __user *buf,
        if (avail > count)
                avail = count;
 
-       if (stream->ops->copy)
-               retval = stream->ops->copy(stream, buf, avail);
-       else
+       if (stream->ops->copy) {
+               char __user* cbuf = (char __user*)buf;
+               retval = stream->ops->copy(stream, cbuf, avail);
+       } else {
                retval = snd_compr_write_data(stream, buf, avail);
+       }
        if (retval > 0)
                stream->runtime->total_bytes_available += retval;
 
This page took 0.026355 seconds and 5 git commands to generate.