]> git.hungrycats.org Git - linux/commitdiff
[PATCH] sparse: opl annatation
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>
Thu, 3 Jun 2004 11:18:40 +0000 (04:18 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 3 Jun 2004 11:18:40 +0000 (04:18 -0700)
Annotated sound/drivers/opl*

sound/drivers/opl3/opl3_synth.c
sound/drivers/opl4/opl4_proc.c

index bd39864dbdedcd7cc59c6e839770f7da0f235e67..1e6472e3b2cba0308443aebbc82f56c384c651ba 100644 (file)
@@ -94,6 +94,7 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
                   unsigned int cmd, unsigned long arg)
 {
        opl3_t *opl3 = snd_magic_cast(opl3_t, hw->private_data, return -ENXIO);
+       void __user *argp = (void __user *)arg;
 
        snd_assert(opl3 != NULL, return -EINVAL);
 
@@ -105,7 +106,7 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
 
                        info.fm_mode = opl3->fm_mode;
                        info.rhythm = opl3->rhythm;
-                       if (copy_to_user((snd_dm_fm_info_t *) arg, &info, sizeof(snd_dm_fm_info_t)))
+                       if (copy_to_user(argp, &info, sizeof(snd_dm_fm_info_t)))
                                return -EFAULT;
                        return 0;
                }
@@ -123,7 +124,7 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
 #endif
                {
                        snd_dm_fm_note_t note;
-                       if (copy_from_user(&note, (snd_dm_fm_note_t *) arg, sizeof(snd_dm_fm_note_t)))
+                       if (copy_from_user(&note, argp, sizeof(snd_dm_fm_note_t)))
                                return -EFAULT;
                        return snd_opl3_play_note(opl3, &note);
                }
@@ -134,7 +135,7 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
 #endif
                {
                        snd_dm_fm_voice_t voice;
-                       if (copy_from_user(&voice, (snd_dm_fm_voice_t *) arg, sizeof(snd_dm_fm_voice_t)))
+                       if (copy_from_user(&voice, argp, sizeof(snd_dm_fm_voice_t)))
                                return -EFAULT;
                        return snd_opl3_set_voice(opl3, &voice);
                }
@@ -145,7 +146,7 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
 #endif
                {
                        snd_dm_fm_params_t params;
-                       if (copy_from_user(&params, (snd_dm_fm_params_t *) arg, sizeof(snd_dm_fm_params_t)))
+                       if (copy_from_user(&params, argp, sizeof(snd_dm_fm_params_t)))
                                return -EFAULT;
                        return snd_opl3_set_params(opl3, &params);
                }
index 2b346d6001384d5a5c2de5cc8aa74d449e269df1..f2f364d15a26bddf86a63fba21bb119c78c30e91 100644 (file)
@@ -50,7 +50,7 @@ static int snd_opl4_mem_proc_release(snd_info_entry_t *entry,
 }
 
 static long snd_opl4_mem_proc_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)
 {
        opl4_t *opl4 = snd_magic_cast(opl4_t, entry->private_data, return -ENXIO);
        long size;
@@ -76,7 +76,7 @@ static long snd_opl4_mem_proc_read(snd_info_entry_t *entry, void *file_private_d
 }
 
 static long snd_opl4_mem_proc_write(snd_info_entry_t *entry, void *file_private_data,
-                                   struct file *file, const char *_buf, long count)
+                                   struct file *file, const char __user *_buf, long count)
 {
        opl4_t *opl4 = snd_magic_cast(opl4_t, entry->private_data, return -ENXIO);
        long size;