X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Foss%2Fdmasound%2Fdmasound_core.c;h=c9302a1e515ba98201d268e4202905b0247d5bdc;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=758ea0cd5cd21de02791de509bccf75bddcaa126;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c index 758ea0cd5..c9302a1e5 100644 --- a/sound/oss/dmasound/dmasound_core.c +++ b/sound/oss/dmasound/dmasound_core.c @@ -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;