patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / sound / pci / rme32.c
index 3a68a7f..2f20966 100644 (file)
@@ -61,6 +61,7 @@
 #include <linux/interrupt.h>
 #include <linux/pci.h>
 #include <linux/slab.h>
+#include <linux/moduleparam.h>
 
 #include <sound/core.h>
 #include <sound/info.h>
@@ -68,7 +69,6 @@
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
 #include <sound/asoundef.h>
-#define SNDRV_GET_ID
 #include <sound/initval.h>
 
 #include <asm/io.h>
 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;     /* Index 0-MAX */
 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;      /* ID for this card */
 static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;     /* Enable this card */
+static int boot_devs;
 
-MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+module_param_array(index, int, boot_devs, 0444);
 MODULE_PARM_DESC(index, "Index value for RME Digi32 soundcard.");
 MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
-MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+module_param_array(id, charp, boot_devs, 0444);
 MODULE_PARM_DESC(id, "ID string for RME Digi32 soundcard.");
 MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
-MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+module_param_array(enable, bool, boot_devs, 0444);
 MODULE_PARM_DESC(enable, "Enable RME Digi32 soundcard.");
 MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
 MODULE_AUTHOR("Martin Langer <martin-langer@gmx.de>");
@@ -297,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;
@@ -310,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;
@@ -1995,15 +1996,7 @@ static struct pci_driver driver = {
 
 static int __init alsa_card_rme32_init(void)
 {
-       int err;
-
-       if ((err = pci_module_init(&driver)) < 0) {
-#ifdef MODULE
-               snd_printk("No RME Digi32 cards found\n");
-#endif
-               return err;
-       }
-       return 0;
+       return pci_module_init(&driver);
 }
 
 static void __exit alsa_card_rme32_exit(void)
@@ -2013,22 +2006,3 @@ static void __exit alsa_card_rme32_exit(void)
 
 module_init(alsa_card_rme32_init)
 module_exit(alsa_card_rme32_exit)
-
-#ifndef MODULE
-
-static int __init alsa_card_rme32_setup(char *str)
-{
-       static unsigned __initdata nr_dev = 0;
-
-       if (nr_dev >= SNDRV_CARDS)
-               return 0;
-       (void) (get_option(&str, &enable[nr_dev]) == 2 &&
-               get_option(&str, &index[nr_dev]) == 2 &&
-               get_id(&str, &id[nr_dev]) == 2);
-       nr_dev++;
-       return 1;
-}
-
-__setup("snd-rme32=", alsa_card_rme32_setup);
-
-#endif                         /* ifndef MODULE */