Update of /cvsroot/alsa/alsa-kernel/core
In directory sc8-pr-cvs1:/tmp/cvs-serv27351

Modified Files:
        memalloc.c 
Log Message:
- fixed typo.
- check the max. card number.



Index: memalloc.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/memalloc.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- memalloc.c  24 Mar 2003 16:06:01 -0000      1.3
+++ memalloc.c  25 Mar 2003 09:49:05 -0000      1.4
@@ -41,8 +41,11 @@
 
 
 #ifdef ENABLE_PREALLOC
-static int enable[8] = {[0 ... 7] = 1};
-MODULE_PARM(enable, "1-" __MODULE_STRING(HAMMERFALL_CARDS) "i");
+#ifndef SNDRV_CARDS
+#define SNDRV_CARDS    8
+#endif
+static int enable[8] = {[0 ... (SNDRV_CARDS-1)] = 1};
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
 MODULE_PARM_DESC(enable, "Enable cards to allocate buffers.");
 #endif
 
@@ -777,6 +780,8 @@
 
        pci_for_each_dev(pci) {
                struct prealloc_dev *dev;
+               if (card >= SNDRV_CARDS)
+                       break;
                for (dev = prealloc_devices; dev->vendor; dev++) {
                        unsigned int i;
                        if (dev->vendor != pci->vendor || dev->device != pci->device)



-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to