[MPlayer-matrox] anyone still using a G200

Tamas, Gergely dice at mfa.kfki.hu
Sun Sep 3 16:55:16 CEST 2006


Hi,

 > How do you want to use multiple cards? Current driver has the minor
 > number hard-coded :
 > 
 > 1141:			mga_cdev_handle = MKDEV(major,0);
 > 1146:				class_device_create(mga_vid_class, NULL, MKDEV (mga_vid_major, 0), NULL, "mga_vid");
 > 1198:	class_device_destroy(mga_vid_class, MKDEV(mga_vid_major, 0));

My fault...

Can you try the following patch (I only have agp ones, and so cannot put
multiple cards into my computer) ...

--- <<< --- <<< --- <<< ---
diff -ur mga_vid~/mga_vid.c mga_vid/mga_vid.c
--- mga_vid~/mga_vid.c	2006-07-29 23:25:08.000000000 +0200
+++ mga_vid/mga_vid.c	2006-09-03 18:06:35.000000000 +0200
@@ -1143,7 +1143,10 @@
 				mga_vid_major = major;
 
 				mga_vid_class = class_create(THIS_MODULE, "mga_vid");
-				class_device_create(mga_vid_class, NULL, MKDEV (mga_vid_major, 0), NULL, "mga_vid");
+				for(i = 0; i < mga_cards_num; i++)
+				{
+					class_device_create(mga_vid_class, NULL, MKDEV (mga_vid_major, i), NULL, "mga_vid");
+				}
 
  				printk(KERN_INFO "mga_vid: using major: %d (assigned or default!)\n", major);
 			}
@@ -1195,7 +1198,10 @@
 		}
 	}
 
-	class_device_destroy(mga_vid_class, MKDEV(mga_vid_major, 0));
+	for(i = 0; i < mga_cards_num; i++)
+	{
+		class_device_destroy(mga_vid_class, MKDEV(mga_vid_major, i));
+	}
 	class_destroy(mga_vid_class);
 
 	//FIXME turn off BES
--- <<< --- <<< --- <<< ---

Gergely



More information about the MPlayer-matrox mailing list