Commit 861cba55 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] sparse: rest of ALSA annotation

The rest of annotation for ALSA drivers; only OSS stuff left to do in
sound/*
parent b83776fe
......@@ -60,7 +60,7 @@ typedef struct snd_emux_operators {
void (*free_voice)(snd_emux_voice_t *vp);
void (*reset)(snd_emux_t *emu, int ch);
/* the first parameters are snd_emux_t */
int (*sample_new)(snd_emux_t *emu, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr, const void *data, long count);
int (*sample_new)(snd_emux_t *emu, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr, const void __user *data, long count);
int (*sample_free)(snd_emux_t *emu, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr);
void (*sample_reset)(snd_emux_t *emu);
int (*load_fx)(snd_emux_t *emu, int type, int arg, const void __user *data, long count);
......
......@@ -1185,7 +1185,7 @@ static void snd_cs4281_proc_read(snd_info_entry_t *entry,
}
static long snd_cs4281_BA0_read(snd_info_entry_t *entry, void *file_private_data,
struct file *file, char *buf, long count)
struct file *file, char __user *buf, long count)
{
long size;
cs4281_t *chip = snd_magic_cast(cs4281_t, entry->private_data, return -ENXIO);
......@@ -1202,7 +1202,7 @@ static long snd_cs4281_BA0_read(snd_info_entry_t *entry, void *file_private_data
}
static long snd_cs4281_BA1_read(snd_info_entry_t *entry, void *file_private_data,
struct file *file, char *buf, long count)
struct file *file, char __user *buf, long count)
{
long size;
cs4281_t *chip = snd_magic_cast(cs4281_t, entry->private_data, return -ENXIO);
......
......@@ -2866,7 +2866,7 @@ void __devinit snd_cs46xx_gameport(cs46xx_t *chip)
*/
static long snd_cs46xx_io_read(snd_info_entry_t *entry, void *file_private_data,
struct file *file, char *buf, long count)
struct file *file, char __user *buf, long count)
{
long size;
snd_cs46xx_region_t *region = (snd_cs46xx_region_t *)entry->private_data;
......
......@@ -822,7 +822,7 @@ static snd_pcm_uframes_t snd_es1938_playback_pointer(snd_pcm_substream_t *substr
static int snd_es1938_capture_copy(snd_pcm_substream_t *substream,
int channel,
snd_pcm_uframes_t pos,
void *dst,
void __user *dst,
snd_pcm_uframes_t count)
{
snd_pcm_runtime_t *runtime = substream->runtime;
......@@ -836,7 +836,7 @@ static int snd_es1938_capture_copy(snd_pcm_substream_t *substream,
} else {
if (copy_to_user(dst, runtime->dma_area + pos + 1, count - 1))
return -EFAULT;
if (put_user(runtime->dma_area[0], ((unsigned char *)dst) + count - 1))
if (put_user(runtime->dma_area[0], ((unsigned char __user *)dst) + count - 1))
return -EFAULT;
}
return 0;
......
......@@ -1328,7 +1328,7 @@ static int snd_korg1212_silence(korg1212_t *korg1212, int pos, int count, int of
return 0;
}
static int snd_korg1212_copy_to(korg1212_t *korg1212, void *dst, int pos, int count, int offset, int size)
static int snd_korg1212_copy_to(korg1212_t *korg1212, void __user *dst, int pos, int count, int offset, int size)
{
KorgAudioFrame * src = korg1212->recordDataBufsPtr[0].bufferData + pos;
int i, rc;
......@@ -1346,7 +1346,7 @@ static int snd_korg1212_copy_to(korg1212_t *korg1212, void *dst, int pos, int co
return -EFAULT;
}
#endif
rc = copy_to_user((void*) dst + offset, src, size);
rc = copy_to_user(dst + offset, src, size);
if (rc) {
#if K1212_DEBUG_LEVEL > 0
K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_copy_to USER EFAULT src=%p dst=%p iter=%d\n", src, dst, i);
......@@ -1360,7 +1360,7 @@ static int snd_korg1212_copy_to(korg1212_t *korg1212, void *dst, int pos, int co
return 0;
}
static int snd_korg1212_copy_from(korg1212_t *korg1212, void *src, int pos, int count, int offset, int size)
static int snd_korg1212_copy_from(korg1212_t *korg1212, void __user *src, int pos, int count, int offset, int size)
{
KorgAudioFrame * dst = korg1212->playDataBufsPtr[0].bufferData + pos;
int i, rc;
......@@ -1671,7 +1671,7 @@ static snd_pcm_uframes_t snd_korg1212_capture_pointer(snd_pcm_substream_t *subst
static int snd_korg1212_playback_copy(snd_pcm_substream_t *substream,
int channel, /* not used (interleaved data) */
snd_pcm_uframes_t pos,
void *src,
void __user *src,
snd_pcm_uframes_t count)
{
korg1212_t *korg1212 = _snd_pcm_substream_chip(substream);
......@@ -1701,7 +1701,7 @@ static int snd_korg1212_playback_silence(snd_pcm_substream_t *substream,
static int snd_korg1212_capture_copy(snd_pcm_substream_t *substream,
int channel, /* not used (interleaved data) */
snd_pcm_uframes_t pos,
void *dst,
void __user *dst,
snd_pcm_uframes_t count)
{
korg1212_t *korg1212 = _snd_pcm_substream_chip(substream);
......
......@@ -1154,7 +1154,7 @@ static long long snd_mixart_BA1_llseek(snd_info_entry_t *entry,
mixart_BA0 proc interface for BAR 0 - read callback
*/
static long snd_mixart_BA0_read(snd_info_entry_t *entry, void *file_private_data,
struct file *file, char *buf, long count)
struct file *file, char __user *buf, long count)
{
mixart_mgr_t *mgr = snd_magic_cast(mixart_mgr_t, entry->private_data, return -ENXIO);
......@@ -1173,7 +1173,7 @@ static long snd_mixart_BA0_read(snd_info_entry_t *entry, void *file_private_data
mixart_BA1 proc interface for BAR 1 - read callback
*/
static long snd_mixart_BA1_read(snd_info_entry_t *entry, void *file_private_data,
struct file *file, char *buf, long count)
struct file *file, char __user *buf, long count)
{
mixart_mgr_t *mgr = snd_magic_cast(mixart_mgr_t, entry->private_data, return -ENXIO);
......
......@@ -684,7 +684,7 @@ static int
snd_nm256_playback_copy(snd_pcm_substream_t *substream,
int channel, /* not used (interleaved data) */
snd_pcm_uframes_t pos,
void *src,
void __user *src,
snd_pcm_uframes_t count)
{
snd_pcm_runtime_t *runtime = substream->runtime;
......
......@@ -298,7 +298,7 @@ static int snd_rme32_playback_silence(snd_pcm_substream_t * substream, int chann
static int snd_rme32_playback_copy(snd_pcm_substream_t * substream, int channel, /* not used (interleaved data) */
snd_pcm_uframes_t pos,
void *src, snd_pcm_uframes_t count)
void __user *src, snd_pcm_uframes_t count)
{
rme32_t *rme32 = _snd_pcm_substream_chip(substream);
count <<= rme32->playback_frlog;
......@@ -311,7 +311,7 @@ static int snd_rme32_playback_copy(snd_pcm_substream_t * substream, int channel,
static int snd_rme32_capture_copy(snd_pcm_substream_t * substream, int channel, /* not used (interleaved data) */
snd_pcm_uframes_t pos,
void *dst, snd_pcm_uframes_t count)
void __user *dst, snd_pcm_uframes_t count)
{
rme32_t *rme32 = _snd_pcm_substream_chip(substream);
count <<= rme32->capture_frlog;
......
......@@ -361,7 +361,7 @@ static int
snd_rme96_playback_copy(snd_pcm_substream_t *substream,
int channel, /* not used (interleaved data) */
snd_pcm_uframes_t pos,
void *src,
void __user *src,
snd_pcm_uframes_t count)
{
rme96_t *rme96 = _snd_pcm_substream_chip(substream);
......@@ -376,7 +376,7 @@ static int
snd_rme96_capture_copy(snd_pcm_substream_t *substream,
int channel, /* not used (interleaved data) */
snd_pcm_uframes_t pos,
void *dst,
void __user *dst,
snd_pcm_uframes_t count)
{
rme96_t *rme96 = _snd_pcm_substream_chip(substream);
......
......@@ -34,7 +34,7 @@
/* Prototypes for static functions */
static int open_patch(snd_sf_list_t *sflist, const char *data, int count, int client);
static int open_patch(snd_sf_list_t *sflist, const char __user *data, int count, int client);
static snd_soundfont_t *newsf(snd_sf_list_t *sflist, int type, char *name);
static int is_identical_font(snd_soundfont_t *sf, int type, unsigned char *name);
static int close_patch(snd_sf_list_t *sflist);
......
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