VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / sound / oss / dmasound / dmasound_core.c
index 758ea0c..c9302a1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/drivers/sound/dmasound/dmasound_core.c
+ *  linux/sound/oss/dmasound/dmasound_core.c
  *
  *
  *  OSS/Free compatible Atari TT/Falcon and Amiga DMA sound driver for
@@ -279,11 +279,11 @@ static int sound_set_stereo(int stereo)
        return stereo;
 }
 
-static ssize_t sound_copy_translate(TRANS *trans, const u_char *userPtr,
+static ssize_t sound_copy_translate(TRANS *trans, const u_char __user *userPtr,
                                    size_t userCount, u_char frame[],
                                    ssize_t *frameUsed, ssize_t frameLeft)
 {
-       ssize_t (*ct_func)(const u_char *, size_t, u_char *, ssize_t *, ssize_t);
+       ssize_t (*ct_func)(const u_char __user *, size_t, u_char *, ssize_t *, ssize_t);
 
        switch (dmasound.soft.format) {
            case AFMT_MU_LAW:
@@ -361,7 +361,7 @@ static int mixer_ioctl(struct inode *inode, struct file *file, u_int cmd,
                    strlcpy(info.id, dmasound.mach.name2, sizeof(info.id));
                    strlcpy(info.name, dmasound.mach.name2, sizeof(info.name));
                    info.modify_counter = mixer.modify_counter;
-                   if (copy_to_user((int *)arg, &info, sizeof(info)))
+                   if (copy_to_user((void __user *)arg, &info, sizeof(info)))
                            return -EFAULT;
                    return 0;
                }
@@ -425,7 +425,7 @@ static int sq_allocate_buffers(struct sound_queue *sq, int num, int size)
                        while (i--)
                                dmasound.mach.dma_free(sq->buffers[i], size);
                        kfree(sq->buffers);
-                       sq->buffers = 0;
+                       sq->buffers = NULL;
                        return -ENOMEM;
                }
        }
@@ -447,7 +447,7 @@ static void sq_release_buffers(struct sound_queue *sq)
 
 static int sq_setup(struct sound_queue *sq)
 {
-       int (*setup_func)(void) = 0;
+       int (*setup_func)(void) = NULL;
        int hard_frame ;
 
        if (sq->locked) { /* are we already set? - and not changeable */
@@ -546,7 +546,7 @@ static inline void sq_play(void)
        dmasound.mach.play();
 }
 
-static ssize_t sq_write(struct file *file, const char *src, size_t uLeft,
+static ssize_t sq_write(struct file *file, const char __user *src, size_t uLeft,
                        loff_t *ppos)
 {
        ssize_t uWritten = 0;
@@ -703,7 +703,7 @@ static unsigned int sq_poll(struct file *file, struct poll_table_struct *wait)
      *  it and restart the DMA.
      */
 
-static ssize_t sq_read(struct file *file, char *dst, size_t uLeft,
+static ssize_t sq_read(struct file *file, char __user *dst, size_t uLeft,
                       loff_t *ppos)
 {
 
@@ -1321,7 +1321,7 @@ static int sq_ioctl(struct inode *inode, struct file *file, u_int cmd,
                        info.fragstotal = write_sq.max_active;
                        info.fragsize = write_sq.user_frag_size;
                        info.bytes = info.fragments * info.fragsize;
-                       if (copy_to_user((void *)arg, &info, sizeof(info)))
+                       if (copy_to_user((void __user *)arg, &info, sizeof(info)))
                                return -EFAULT;
                        return 0;
                } else
@@ -1547,7 +1547,7 @@ static int state_release(struct inode *inode, struct file *file)
        return 0;
 }
 
-static ssize_t state_read(struct file *file, char *buf, size_t count,
+static ssize_t state_read(struct file *file, char __user *buf, size_t count,
                          loff_t *ppos)
 {
        int n = state.len - state.ptr;