vserver 1.9.3
[linux-2.6.git] / sound / core / seq / instr / ainstr_gf1.c
index d1029df..6c21e52 100644 (file)
@@ -30,8 +30,6 @@
 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
 MODULE_DESCRIPTION("Advanced Linux Sound Architecture GF1 (GUS) Patch support.");
 MODULE_LICENSE("GPL");
-MODULE_CLASSES("{sound}");
-MODULE_SUPPORTED_DEVICE("sound");
 
 char *snd_seq_gf1_id = SNDRV_SEQ_INSTR_ID_GUS_PATCH;
 
@@ -48,7 +46,7 @@ static unsigned int snd_seq_gf1_size(unsigned int size, unsigned int format)
 
 static int snd_seq_gf1_copy_wave_from_stream(snd_gf1_ops_t *ops,
                                             gf1_instrument_t *ip,
-                                            char **data,
+                                            char __user **data,
                                             long *len,
                                             int atomic)
 {
@@ -64,7 +62,7 @@ static int snd_seq_gf1_copy_wave_from_stream(snd_gf1_ops_t *ops,
                return -EFAULT;
        *data += sizeof(xp);
        *len -= sizeof(xp);
-       wp = (gf1_wave_t *)snd_kcalloc(sizeof(*wp), gfp_mask);
+       wp = kcalloc(1, sizeof(*wp), gfp_mask);
        if (wp == NULL)
                return -ENOMEM;
        wp->share_id[0] = le32_to_cpu(xp.share_id[0]);
@@ -141,7 +139,8 @@ static void snd_seq_gf1_instr_free(snd_gf1_ops_t *ops,
 }
 
 static int snd_seq_gf1_put(void *private_data, snd_seq_kinstr_t *instr,
-                          char *instr_data, long len, int atomic, int cmd)
+                          char __user *instr_data, long len, int atomic,
+                          int cmd)
 {
        snd_gf1_ops_t *ops = (snd_gf1_ops_t *)private_data;
        gf1_instrument_t *ip;
@@ -192,7 +191,7 @@ static int snd_seq_gf1_put(void *private_data, snd_seq_kinstr_t *instr,
 
 static int snd_seq_gf1_copy_wave_to_stream(snd_gf1_ops_t *ops,
                                           gf1_instrument_t *ip,
-                                          char **data,
+                                          char __user **data,
                                           long *len,
                                           int atomic)
 {
@@ -253,7 +252,8 @@ static int snd_seq_gf1_copy_wave_to_stream(snd_gf1_ops_t *ops,
 }
 
 static int snd_seq_gf1_get(void *private_data, snd_seq_kinstr_t *instr,
-                          char *instr_data, long len, int atomic, int cmd)
+                          char __user *instr_data, long len, int atomic,
+                          int cmd)
 {
        snd_gf1_ops_t *ops = (snd_gf1_ops_t *)private_data;
        gf1_instrument_t *ip;