Hi..
I have seen this in the bttv-driver: -------------------------------------
#include <linux/module.h> #if LINUX_VERSION_CODE < 0x020100 #include <linux/bios32.h> #endif #include <linux/delay.h> #include <linux/errno.h> #include <linux/fs.h> #include <linux/kernel.h> #include <linux/major.h> #include <linux/malloc.h> #include <linux/vmalloc.h> #include <linux/mm.h> #include <linux/pci.h> #include <linux/signal.h> #include <asm/io.h> #include <asm/pgtable.h> #include <asm/page.h> #include <linux/sched.h> #include <asm/segment.h> #include <linux/types.h> #include <linux/wrapper.h>
........... if (!pcibios_present()) { DEBUG(printk(KERN_DEBUG "bttv%d: PCI-BIOS not present or not accessable!\n",bttv_num)); return 0; }
for (pci_index = 0; !pcibios_find_device(PCI_VENDOR_ID_BROOKTREE, PCI_DEVICE_ID_BT849, pci_index, &bus, &devfn) ||!pcibios_find_device(PCI_VENDOR_ID_BROOKTREE, PCI_DEVICE_ID_BT848, pci_index, &bus, &devfn) ||!pcibios_find_device(PCI_VENDOR_ID_BROOKTREE, PCI_DEVICE_ID_BT878, pci_index, &bus, &devfn) ||!pcibios_find_device(PCI_VENDOR_ID_BROOKTREE, PCI_DEVICE_ID_BT879, pci_index, &bus, &devfn); ++pci_index) {............. --------------------------------------- I hope it cold help, but it isn't an user-space driver.
|