summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorMingkai Hu <mingkai.hu@nxp.com>2016-01-27 07:16:47 (GMT)
committerXie Xiaobo <xiaobo.xie@nxp.com>2017-09-25 07:25:40 (GMT)
commit0e56d5bff55235055866c8c1d937c24699d34832 (patch)
tree288c7a33a76f01f595f01da1481f1afa3ae766e7 /drivers/pci
parent796a099d4a2ff1e23692629bfa7be35fe1288945 (diff)
downloadlinux-0e56d5bff55235055866c8c1d937c24699d34832.tar.xz
pci/layerscape: fix compile issue
WARNING: drivers/built-in.o(.data+0x1024): Section mismatch in reference from the variable ls_pcie_ep_driver to the function .init.text:ls_pcie_ep_probe() The variable ls_pcie_ep_driver references the function __init ls_pcie_ep_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console drivers/built-in.o: In function `ls_pcie_ep_test_thread': :(.text+0x1528a): undefined reference to `__aeabi_uldivmod' :(.text+0x153a4): undefined reference to `__aeabi_uldivmod' make: *** [vmlinux] Error 1 Signed-off-by: Mingkai Hu <mingkai.hu@nxp.com> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/host/pci-layerscape-ep-debugfs.c9
-rw-r--r--drivers/pci/host/pci-layerscape-ep.c2
2 files changed, 5 insertions, 6 deletions
diff --git a/drivers/pci/host/pci-layerscape-ep-debugfs.c b/drivers/pci/host/pci-layerscape-ep-debugfs.c
index 037af96..6d5c781 100644
--- a/drivers/pci/host/pci-layerscape-ep-debugfs.c
+++ b/drivers/pci/host/pci-layerscape-ep-debugfs.c
@@ -204,8 +204,8 @@ static int ls_pcie_ep_test_dma(struct ls_ep_test *test)
getrawmonotonic(&end);
period = timespec_sub(end, start);
- test->result = test->len * 8ULL * i * 1000 /
- (period.tv_sec * 1000 * 1000 * 1000 + period.tv_nsec);
+ test->result = test->len * 8ULL * i * 1000;
+ do_div(test->result, period.tv_sec * 1000 * 1000 * 1000 + period.tv_nsec);
dma_release_channel(chan);
return 0;
@@ -240,9 +240,8 @@ static int ls_pcie_ep_test_cpy(struct ls_ep_test *test)
getrawmonotonic(&end);
period = timespec_sub(end, start);
-
- test->result = test->len * 8ULL * i * 1000 /
- (period.tv_sec * 1000 * 1000 * 1000 + period.tv_nsec);
+ test->result = test->len * 8ULL * i * 1000;
+ do_div(test->result, period.tv_sec * 1000 * 1000 * 1000 + period.tv_nsec);
return 0;
}
diff --git a/drivers/pci/host/pci-layerscape-ep.c b/drivers/pci/host/pci-layerscape-ep.c
index ce5ed7d..461151e 100644
--- a/drivers/pci/host/pci-layerscape-ep.c
+++ b/drivers/pci/host/pci-layerscape-ep.c
@@ -189,7 +189,7 @@ static int ls_pcie_ep_init(struct ls_pcie *pcie)
return 0;
}
-static int __init ls_pcie_ep_probe(struct platform_device *pdev)
+static int ls_pcie_ep_probe(struct platform_device *pdev)
{
struct ls_pcie *pcie;
struct resource *dbi_base;