[MPlayer-matrox] [PATCH] compile mga_vid-2.6.11 for kernel 2.6.12
TAMAS Gergely
dice at mfa.kfki.hu
Sat Jun 18 09:55:26 CEST 2005
Hi!
Something like the following patch is needed to compile mga_vid for
kernel 2.6.12.
--- >>> --- >>> --- >>> ---
--- mga-vid-2.6.11/mga_vid.c 2005-06-05 18:11:05.000000000 +0200
+++ mga-vid-2.6.12/mga_vid.c 2005-06-18 09:43:16.567858384 +0200
@@ -117,6 +117,12 @@
// the allocation of an additional page if exactly 4k is used
#define PARAM_BUFF_SIZE 4000
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12)
+#define PCI_SLOT_NAME(x) (x)->slot_name
+#else
+#define PCI_SLOT_NAME(x) (x)->dev.bus_id
+#endif
+
#ifndef min
#define min(x,y) (((x)<(y))?(x):(y))
#endif
@@ -839,27 +845,27 @@
switch(dev->device) {
case PCI_DEVICE_ID_MATROX_G550:
mga_dev_name = "MGA G550";
- printk(KERN_INFO "mga_vid: Found %s at %s [%s]\n", mga_dev_name, dev->slot_name, pci_name(dev));
+ printk(KERN_INFO "mga_vid: Found %s at %s [%s]\n", mga_dev_name, PCI_SLOT_NAME(dev), pci_name(dev));
cards_init(card, dev, mga_cards_num - 1, 1);
break;
case PCI_DEVICE_ID_MATROX_G400:
mga_dev_name = "MGA G400/G450";
- printk(KERN_INFO "mga_vid: Found %s at %s [%s]\n", mga_dev_name, dev->slot_name, pci_name(dev));
+ printk(KERN_INFO "mga_vid: Found %s at %s [%s]\n", mga_dev_name, PCI_SLOT_NAME(dev), pci_name(dev));
cards_init(card, dev, mga_cards_num - 1, 1);
break;
case PCI_DEVICE_ID_MATROX_G200_AGP:
mga_dev_name = "MGA G200 AGP";
- printk(KERN_INFO "mga_vid: Found %s at %s [%s]\n", mga_dev_name, dev->slot_name, pci_name(dev));
+ printk(KERN_INFO "mga_vid: Found %s at %s [%s]\n", mga_dev_name, PCI_SLOT_NAME(dev), pci_name(dev));
cards_init(card, dev, mga_cards_num - 1, 0);
break;
case PCI_DEVICE_ID_MATROX_G200_PCI:
mga_dev_name = "MGA G200";
- printk(KERN_INFO "mga_vid: Found %s at %s [%s]\n", mga_dev_name, dev->slot_name, pci_name(dev));
+ printk(KERN_INFO "mga_vid: Found %s at %s [%s]\n", mga_dev_name, PCI_SLOT_NAME(dev), pci_name(dev));
cards_init(card, dev, mga_cards_num - 1, 0);
break;
default:
mga_cards_num--;
- printk(KERN_INFO "mga_vid: ignoring unsupported matrox device (%d) at %s [%s]\n", dev->device, dev->slot_name, pci_name(dev));
+ printk(KERN_INFO "mga_vid: ignoring unsupported matrox device (%d) at %s [%s]\n", dev->device, PCI_SLOT_NAME(dev), pci_name(dev));
break;
}
}
--- <<< --- <<< --- <<< ---
Gergely
More information about the MPlayer-matrox
mailing list