]> git.hungrycats.org Git - linux/commitdiff
[PATCH] sparse: annotation of include/sound (generic parts)
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>
Thu, 3 Jun 2004 09:48:01 +0000 (02:48 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 3 Jun 2004 09:48:01 +0000 (02:48 -0700)
Annotated method prototypes, commonly used ioctl-only structures and
generic helpers.

Instances of methods in drivers are _not_ annotated at that point - they
will go with driver patches

include/sound/ainstr_gf1.h
include/sound/ainstr_iw.h
include/sound/ainstr_simple.h
include/sound/asound.h
include/sound/hwdep.h
include/sound/info.h
include/sound/pcm.h
include/sound/seq_instr.h

index 882d17b395ff40c0f7e2f4f2f91fa446e73b8dbf..c59f737657b81a1b513838e28b656c371c81e166 100644 (file)
@@ -209,9 +209,9 @@ typedef struct {
        void *private_data;
        int (*info)(void *private_data, gf1_info_t *info);
        int (*put_sample)(void *private_data, gf1_wave_t *wave,
-                         char *data, long len, int atomic);
+                         char __user *data, long len, int atomic);
        int (*get_sample)(void *private_data, gf1_wave_t *wave,
-                         char *data, long len, int atomic);
+                         char __user *data, long len, int atomic);
        int (*remove_sample)(void *private_data, gf1_wave_t *wave,
                             int atomic);
        void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what);
index ace103158854bff48fd27c261e42472d02b84499..1b5155fb1087fc523c4724a244dba43584ffda8f 100644 (file)
@@ -357,9 +357,9 @@ typedef struct {
        void *private_data;
        int (*info)(void *private_data, iwffff_info_t *info);
        int (*put_sample)(void *private_data, iwffff_wave_t *wave,
-                         char *data, long len, int atomic);
+                         char __user *data, long len, int atomic);
        int (*get_sample)(void *private_data, iwffff_wave_t *wave,
-                         char *data, long len, int atomic);
+                         char __user *data, long len, int atomic);
        int (*remove_sample)(void *private_data, iwffff_wave_t *wave,
                             int atomic);
        void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what);
index bef1f990c69e424cec0819d8d536067f9f8d36dd..da73df0b1d34828208d25b244d9ac8df63f459a2 100644 (file)
@@ -140,9 +140,9 @@ typedef struct {
        void *private_data;
        int (*info)(void *private_data, simple_instrument_info_t *info);
        int (*put_sample)(void *private_data, simple_instrument_t *instr,
-                         char *data, long len, int atomic);
+                         char __user *data, long len, int atomic);
        int (*get_sample)(void *private_data, simple_instrument_t *instr,
-                         char *data, long len, int atomic);
+                         char __user *data, long len, int atomic);
        int (*remove_sample)(void *private_data, simple_instrument_t *instr,
                             int atomic);
        void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what);
index 62841fe156ae404d5f2a6ad90b41a7fa109906c0..69dc1829eba9b144bda3c1da8c9edc7223cbe6be 100644 (file)
@@ -135,7 +135,7 @@ struct sndrv_hwdep_dsp_status {
 struct sndrv_hwdep_dsp_image {
        unsigned int index;             /* W: DSP index */
        unsigned char name[64];         /* W: ID (e.g. file name) */
-       unsigned char *image;           /* W: binary image */
+       unsigned char __user *image;    /* W: binary image */
        size_t length;                  /* W: size of image in bytes */
        unsigned long driver_data;      /* W: driver-specific data */
 };
@@ -446,13 +446,13 @@ struct sndrv_pcm_sync_ptr {
 
 struct sndrv_xferi {
        sndrv_pcm_sframes_t result;
-       void *buf;
+       void __user *buf;
        sndrv_pcm_uframes_t frames;
 };
 
 struct sndrv_xfern {
        sndrv_pcm_sframes_t result;
-       void **bufs;
+       void __user * __user *bufs;
        sndrv_pcm_uframes_t frames;
 };
 
@@ -776,7 +776,7 @@ struct sndrv_ctl_elem_list {
        unsigned int space;             /* W: count of element IDs to get */
        unsigned int used;              /* R: count of element IDs set */
        unsigned int count;             /* R: count of all elements */
-       struct sndrv_ctl_elem_id *pids; /* R: IDs */
+       struct sndrv_ctl_elem_id __user *pids; /* R: IDs */
        unsigned char reserved[50];
 };
 
index 5e72865bd4c1c7d24c408a030faf113580353921..4a4cc0167fac3f61a7c5510c62468f38eac57b6a 100644 (file)
@@ -32,8 +32,8 @@ typedef struct sndrv_hwdep_dsp_image snd_hwdep_dsp_image_t;
 
 typedef struct _snd_hwdep_ops {
        long long (*llseek) (snd_hwdep_t *hw, struct file * file, long long offset, int orig);
-       long (*read) (snd_hwdep_t * hw, char *buf, long count, loff_t *offset);
-       long (*write) (snd_hwdep_t * hw, const char *buf, long count, loff_t *offset);
+       long (*read) (snd_hwdep_t * hw, char __user *buf, long count, loff_t *offset);
+       long (*write) (snd_hwdep_t * hw, const char __user *buf, long count, loff_t *offset);
        int (*open) (snd_hwdep_t * hw, struct file * file);
        int (*release) (snd_hwdep_t * hw, struct file * file);
        unsigned int (*poll) (snd_hwdep_t * hw, struct file * file, poll_table * wait);
index 57ba588d04a5a9109f2652627531f62d053d5fe4..9e33b58b8cced3f8fe6acfa739f360afd7883e53 100644 (file)
@@ -54,9 +54,9 @@ struct snd_info_entry_ops {
        int (*release) (snd_info_entry_t * entry,
                        unsigned short mode, void *file_private_data);
        long (*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 (*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);
        long long (*llseek) (snd_info_entry_t *entry, void *file_private_data,
                            struct file * file, long long offset, int orig);
        unsigned int (*poll) (snd_info_entry_t *entry, void *file_private_data,
index 17d8b22090df82aa1408203f32959da7ec4d323a..42293603dac5732462fa118d28fa89096d36c5a8 100644 (file)
@@ -95,7 +95,7 @@ typedef struct _snd_pcm_ops {
        int (*trigger)(snd_pcm_substream_t * substream, int cmd);
        snd_pcm_uframes_t (*pointer)(snd_pcm_substream_t * substream);
        int (*copy)(snd_pcm_substream_t *substream, int channel, snd_pcm_uframes_t pos,
-                   void *buf, snd_pcm_uframes_t count);
+                   void __user *buf, snd_pcm_uframes_t count);
        int (*silence)(snd_pcm_substream_t *substream, int channel, 
                       snd_pcm_uframes_t pos, snd_pcm_uframes_t count);
        struct page *(*page)(snd_pcm_substream_t *substream, unsigned long offset);
@@ -479,7 +479,7 @@ int snd_pcm_notify(snd_pcm_notify_t *notify, int nfree);
 extern rwlock_t snd_pcm_link_rwlock;
 
 int snd_pcm_info(snd_pcm_substream_t * substream, snd_pcm_info_t *info);
-int snd_pcm_info_user(snd_pcm_substream_t * substream, snd_pcm_info_t *info);
+int snd_pcm_info_user(snd_pcm_substream_t * substream, snd_pcm_info_t __user *info);
 int snd_pcm_status(snd_pcm_substream_t * substream, snd_pcm_status_t *status);
 int snd_pcm_prepare(snd_pcm_substream_t *substream);
 int snd_pcm_start(snd_pcm_substream_t *substream);
@@ -881,13 +881,14 @@ void snd_pcm_tick_set(snd_pcm_substream_t *substream, unsigned long ticks);
 void snd_pcm_tick_elapsed(snd_pcm_substream_t *substream);
 void snd_pcm_period_elapsed(snd_pcm_substream_t *substream);
 snd_pcm_sframes_t snd_pcm_lib_write(snd_pcm_substream_t *substream,
-                                   const void *buf, snd_pcm_uframes_t frames);
+                                   const void __user *buf,
+                                   snd_pcm_uframes_t frames);
 snd_pcm_sframes_t snd_pcm_lib_read(snd_pcm_substream_t *substream,
-                                  void *buf, snd_pcm_uframes_t frames);
+                                  void __user *buf, snd_pcm_uframes_t frames);
 snd_pcm_sframes_t snd_pcm_lib_writev(snd_pcm_substream_t *substream,
-                                    void **bufs, snd_pcm_uframes_t frames);
+                                    void __user **bufs, snd_pcm_uframes_t frames);
 snd_pcm_sframes_t snd_pcm_lib_readv(snd_pcm_substream_t *substream,
-                                   void **bufs, snd_pcm_uframes_t frames);
+                                   void __user **bufs, snd_pcm_uframes_t frames);
 
 int snd_pcm_limit_hw_rates(snd_pcm_runtime_t *runtime);
 
index 832d8f53245eb6707a8634a973b316178617e6f6..1a654df4aa97855c47cf6dd1a7e876b28ffabec0 100644 (file)
@@ -79,9 +79,9 @@ struct snd_seq_kinstr_ops {
        char *instr_type;
        int (*info)(void *private_data, char *info_data, long len);
        int (*put)(void *private_data, snd_seq_kinstr_t *kinstr,
-                  char *instr_data, long len, int atomic, int cmd);
+                  char __user *instr_data, long len, int atomic, int cmd);
        int (*get)(void *private_data, snd_seq_kinstr_t *kinstr,
-                  char *instr_data, long len, int atomic, int cmd);
+                  char __user *instr_data, long len, int atomic, int cmd);
        int (*get_size)(void *private_data, snd_seq_kinstr_t *kinstr, long *size);
        int (*remove)(void *private_data, snd_seq_kinstr_t *kinstr, int atomic);
        void (*notify)(void *private_data, snd_seq_kinstr_t *kinstr, int what);