backports: fix build errors for old kernel versions without PCI support
authorPatrick Ziegler <patrick.ziegler@fh-kl.de>
Thu, 15 Aug 2013 12:40:00 +0000 (14:40 +0200)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Fri, 16 Aug 2013 02:56:27 +0000 (19:56 -0700)
Signed-off-by: Patrick Ziegler <patrick.ziegler@fh-kl.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
backport/compat/compat-2.6.25.c
backport/compat/compat-2.6.28.c

index b3597ea1fd658ae52fbd7f7f25b60f1ebccbf4b9..37407a49d09536283513744b503e8b52063d41dc 100644 (file)
@@ -210,6 +210,7 @@ EXPORT_SYMBOL_GPL(sg_alloc_table);
  * to it. We implement a sloppy work around for backporting
  * this.
  */
+#ifdef CONFIG_PCI
 int pci_enable_device_mem(struct pci_dev *dev)
 {
        int bars = pci_select_bars(dev, IORESOURCE_MEM);
@@ -217,6 +218,7 @@ int pci_enable_device_mem(struct pci_dev *dev)
        return pci_enable_device_bars(dev, bars);
 }
 EXPORT_SYMBOL_GPL(pci_enable_device_mem);
+#endif
 
 /**
  * The following things are out of ./lib/vsprintf.c
index e47626b2f906281ed7964e7d00d0ed29f94c73dc..2ff6b1eea16544bfe50fb4c23883dc97ea7d841d 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/usb.h>
 #include <linux/tty.h>
 #include <linux/skbuff.h>
+#include <linux/pci.h>
 #include <asm/poll.h>
 
 /* 2.6.28 compat code goes here */