summarylogtreecommitdiffstats
path: root/4.17-npfeiler-pci_get_domain_bus_and_slot.patch
blob: e27f2a4ee4608cea18cfe05935b62fcc62119624 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- archive_files/common/lib/modules/fglrx/build_mod/kcl_pci.c	2018-07-01 21:02:02.000000000 +0200
+++ archive_files2/common/lib/modules/fglrx/build_mod/kcl_pci.c	2018-07-01 21:05:54.346745135 +0200
@@ -59,7 +59,9 @@
 {
     struct pci_dev* pci_dev;
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0)
+	pci_dev = pci_get_domain_bus_and_slot(0, busnum, PCI_DEVFN(devnum, funcnum));
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
     pci_dev = pci_get_bus_and_slot(busnum, PCI_DEVFN(devnum, funcnum));
 #else
     pci_dev = pci_find_slot(busnum, PCI_DEVFN(devnum, funcnum));
@@ -96,7 +98,9 @@
 KCL_PCI_DevHandle ATI_API_CALL KCL_PCI_GetDevHandle(
     KCL_TYPE_U32 bus, KCL_TYPE_U32 slot)
 {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0)
+    return (KCL_PCI_DevHandle)pci_get_domain_bus_and_slot(0, bus, slot);
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
     return (KCL_PCI_DevHandle)pci_get_bus_and_slot(bus, slot);
 #else
     return (KCL_PCI_DevHandle)pci_find_slot(bus, slot);