mirror of
https://github.com/DigitalDevices/dddvb.git
synced 2023-10-10 13:37:43 +02:00
compiling for kernel 4.12.x
This commit is contained in:
parent
41897e48c8
commit
f84d196a1e
@ -252,7 +252,7 @@ static int dma_alloc(struct pci_dev *pdev, struct ddb_dma *dma, int dir)
|
||||
return 0;
|
||||
for (i = 0; i < dma->num; i++) {
|
||||
if (alt_dma) {
|
||||
#if (KERNEL_VERSION(4, 12, 0) >= LINUX_VERSION_CODE)
|
||||
#if (KERNEL_VERSION(4, 13, 0) > LINUX_VERSION_CODE)
|
||||
dma->vbuf[i] = kmalloc(dma->size, __GFP_REPEAT);
|
||||
#else
|
||||
dma->vbuf[i] = kmalloc(dma->size, __GFP_RETRY_MAYFAIL);
|
||||
@ -3362,7 +3362,7 @@ static const struct file_operations ddb_fops = {
|
||||
.release = ddb_release,
|
||||
};
|
||||
|
||||
#if (KERNEL_VERSION(3, 4, 0) >= LINUX_VERSION_CODE)
|
||||
#if (KERNEL_VERSION(3, 4, 0) > LINUX_VERSION_CODE)
|
||||
static char *ddb_devnode(struct device *device, mode_t *mode)
|
||||
#else
|
||||
static char *ddb_devnode(struct device *device, umode_t *mode)
|
||||
|
@ -86,7 +86,7 @@ static void __devexit ddb_remove(struct pci_dev *pdev)
|
||||
pci_disable_device(pdev);
|
||||
}
|
||||
|
||||
#if (KERNEL_VERSION(3, 8, 0) < LINUX_VERSION_CODE)
|
||||
#if (KERNEL_VERSION(3, 8, 0) <= LINUX_VERSION_CODE)
|
||||
#define __devinit
|
||||
#define __devinitdata
|
||||
#endif
|
||||
@ -97,8 +97,8 @@ static int __devinit ddb_irq_msi(struct ddb *dev, int nr)
|
||||
|
||||
#ifdef CONFIG_PCI_MSI
|
||||
if (msi && pci_msi_enabled()) {
|
||||
#if (KERNEL_VERSION(3, 15, 0) < LINUX_VERSION_CODE)
|
||||
#if (KERNEL_VERSION(4, 11, 0) < LINUX_VERSION_CODE)
|
||||
#if (KERNEL_VERSION(3, 15, 0) <= LINUX_VERSION_CODE)
|
||||
#if (KERNEL_VERSION(4, 11, 0) <= LINUX_VERSION_CODE)
|
||||
stat = pci_alloc_irq_vectors(dev->pdev, 1, nr, PCI_IRQ_MSI);
|
||||
#else
|
||||
stat = pci_enable_msi_range(dev->pdev, 1, nr);
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
#include <linux/version.h>
|
||||
|
||||
#if (KERNEL_VERSION(3, 8, 0) < LINUX_VERSION_CODE)
|
||||
#if (KERNEL_VERSION(3, 8, 0) <= LINUX_VERSION_CODE)
|
||||
#define __devexit
|
||||
#define __devinit
|
||||
#define __devinitconst
|
||||
|
Loading…
x
Reference in New Issue
Block a user