[MPlayer-matrox] r246 - mga_vid/trunk/mga_vid.c
tamasg
subversion at mplayerhq.hu
Sun Sep 3 17:44:48 CEST 2006
Author: tamasg
Date: Sun Sep 3 17:44:48 2006
New Revision: 246
Modified:
mga_vid/trunk/mga_vid.c
Log:
don't hard-code device minor numbers
Modified: mga_vid/trunk/mga_vid.c
==============================================================================
--- mga_vid/trunk/mga_vid.c (original)
+++ mga_vid/trunk/mga_vid.c Sun Sep 3 17:44:48 2006
@@ -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%d", i);
+ }
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
More information about the MPlayer-matrox
mailing list