<style>table.customTableClassName {margin-bottom: 10px;border-collapse: collapse;display: table;}.customTableClassName td, .customTableClassName th {border: 1px solid #ddd;}</style><p style="margin:0px;">The kernel api used in ltp_tpci.c is too old and connot pass compile<br></p><p style="margin:0px;">after 3.12.</p><p style="margin:0px;">---</p><p style="margin:0px;"> .../device-drivers/pci/tpci_kernel/ltp_tpci.c | 30 ++-----------------</p><p style="margin:0px;"> 1 file changed, 2 insertions(+), 28 deletions(-)</p><p style="margin:0px;"><br></p><p style="margin:0px;">diff --git a/testcases/kernel/device-drivers/pci/tpci_kernel/ltp_tpci.c b/testcases/kernel/device-drivers/pci/tpci_kernel/ltp_tpci.c</p><p style="margin:0px;">index 2cf8cefc8..7cbabfaa5 100644</p><p style="margin:0px;">--- a/testcases/kernel/device-drivers/pci/tpci_kernel/ltp_tpci.c</p><p style="margin:0px;">+++ b/testcases/kernel/device-drivers/pci/tpci_kernel/ltp_tpci.c</p><p style="margin:0px;">@@ -61,7 +61,7 @@ MODULE_LICENSE("GPL");</p><p style="margin:0px;"> #define TFAIL<span style="white-space:pre"></span>1</p><p style="margin:0px;"> #define TSKIP<span style="white-space:pre"></span>32</p><p style="margin:0px;"> </p><p style="margin:0px;">-static DEFINE_PCI_DEVICE_TABLE(ltp_pci_tbl) = {</p><p style="margin:0px;">+static const struct pci_device_id ltp_pci_tbl[] = {</p><p style="margin:0px;"> <span style="white-space:pre"></span>{ PCI_DEVICE(PCI_ANY_ID, PCI_ANY_ID) },</p><p style="margin:0px;"> <span style="white-space:pre"></span>{ 0, }</p><p style="margin:0px;"> };</p><p style="margin:0px;">@@ -104,7 +104,7 @@ static int probe_pci_dev(unsigned int bus, unsigned int slot)</p><p style="margin:0px;"> <span style="white-space:pre"></span>ltp_pci.dev = NULL;</p><p style="margin:0px;"> <span style="white-space:pre"></span>}</p><p style="margin:0px;"> </p><p style="margin:0px;">-<span style="white-space:pre"></span>dev = pci_get_bus_and_slot(bus, slot);</p><p style="margin:0px;">+<span style="white-space:pre"></span>dev = pci_get_domain_bus_and_slot(pci_domain_nr(dev->bus), bus, slot);</p><p style="margin:0px;"> <span style="white-space:pre"></span>if (!dev || !dev->driver)</p><p style="margin:0px;"> <span style="white-space:pre"></span>return -ENODEV;</p><p style="margin:0px;"> </p><p style="margin:0px;">@@ -360,29 +360,6 @@ static int test_bus_add_devices(void)</p><p style="margin:0px;"> <span style="white-space:pre"></span>return TFAIL;</p><p style="margin:0px;"> }</p><p style="margin:0px;"> </p><p style="margin:0px;">-/*</p><p style="margin:0px;">- * test_enable_bridges</p><p style="margin:0px;">- *<span style="white-space:pre"></span>make call to pci_enable_bridges,</p><p style="margin:0px;">- *<span style="white-space:pre"></span>use bus pointer from the ltp_pci</p><p style="margin:0px;">- *<span style="white-space:pre"></span>structure</p><p style="margin:0px;">- */</p><p style="margin:0px;">-static int test_enable_bridges(void)</p><p style="margin:0px;">-{</p><p style="margin:0px;">-<span style="white-space:pre"></span>struct pci_bus *bus = ltp_pci.bus;</p><p style="margin:0px;">-</p><p style="margin:0px;">-<span style="white-space:pre"></span>prk_info("enable bridges");</p><p style="margin:0px;">-</p><p style="margin:0px;">-<span style="white-space:pre"></span>pci_enable_bridges(bus);</p><p style="margin:0px;">-</p><p style="margin:0px;">-<span style="white-space:pre"></span>if (bus) {</p><p style="margin:0px;">-<span style="white-space:pre"></span>prk_info("called enable bridges");</p><p style="margin:0px;">-<span style="white-space:pre"></span>return TPASS;</p><p style="margin:0px;">-<span style="white-space:pre"></span>}</p><p style="margin:0px;">-</p><p style="margin:0px;">-<span style="white-space:pre"></span>prk_err("enable_bridges failed");</p><p style="margin:0px;">-<span style="white-space:pre"></span>return TFAIL;</p><p style="margin:0px;">-}</p><p style="margin:0px;">-</p><p style="margin:0px;"> /*</p><p style="margin:0px;">  * test_match_device</p><p style="margin:0px;">  *<span style="white-space:pre"></span>make call to pci_match_device, returns a</p><p style="margin:0px;">@@ -609,9 +586,6 @@ static int test_case(unsigned int cmd)</p><p style="margin:0px;"> <span style="white-space:pre"></span>case BUS_ADD_DEVICES:</p><p style="margin:0px;"> <span style="white-space:pre"></span>rc = test_bus_add_devices();</p><p style="margin:0px;"> <span style="white-space:pre"></span>break;</p><p style="margin:0px;">-<span style="white-space:pre"></span>case ENABLE_BRIDGES:</p><p style="margin:0px;">-<span style="white-space:pre"></span>rc = test_enable_bridges();</p><p style="margin:0px;">-<span style="white-space:pre"></span>break;</p><p style="margin:0px;"> <span style="white-space:pre"></span>case MATCH_DEVICE:</p><p style="margin:0px;"> <span style="white-space:pre"></span>rc = test_match_device();</p><p style="margin:0px;"> <span style="white-space:pre"></span>break;</p><p style="margin:0px;">-- </p>