#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,17)
#define check_mem_region(start,n) 0
-#define request_mem_region(start,n,name) 0
+#define request_mem_region(start,n,name) ((void*) 0)
#define release_mem_region(start,n)
#endif
#define pci_enable_device(x) 0
#define PCI_ANY_ID (~0)
-#define __devinitdata
+#define __devinitdata __initdata
struct pci_device_id {
unsigned int vendor, device;
unsigned long driver_data;
};
+// stuff for allocating pci dma buffers
+#include <asm/io.h>
+#define PCI_DMA_FROMDEVICE 0
+#define PCI_DMA_TODEVICE 0
+static inline void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
+ dma_addr_t *dma_handle)
+{
+ void *virt_ptr;
+
+ virt_ptr = kmalloc(size, GFP_KERNEL);
+ *dma_handle = virt_to_bus(virt_ptr);
+ return virt_ptr;
+}
+#define pci_free_consistent(cookie, size, ptr, dma_ptr) kfree(ptr)
+#define pci_map_single(cookie, address, size, dir) virt_to_bus(address)
+#define pci_unmap_single(cookie, address, size, dir)
+#define pci_dma_sync_single(cookie, address, size, dir)
+
#else
#endif
-#endif
+#endif
#endif /* _COMPAT_PCI_H */