summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2016-12-12 11:25:06 -0600
committerBjorn Helgaas <bhelgaas@google.com>2016-12-12 11:25:06 -0600
commita739d56dfba690e26fd5728f041e8910a16ede31 (patch)
treecace0db6a98771c0afc9aa94117efd40b7d94357 /drivers/pci
parentb5332d0073f706bc0b31e21965c60e21ffa6cda9 (diff)
parentc19699a8c6574efe2fb7949ee5b467612193e2fc (diff)
Merge branch 'pci/host-altera' into next
* pci/host-altera: PCI: altera: Remove redundant error message in altera_pcie_parse_dt() PCI: altera: Use builtin_platform_driver() to simplify the code
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/host/pcie-altera.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/pci/host/pcie-altera.c b/drivers/pci/host/pcie-altera.c
index b0ac4dfafa0b..0c1540225ca3 100644
--- a/drivers/pci/host/pcie-altera.c
+++ b/drivers/pci/host/pcie-altera.c
@@ -550,10 +550,8 @@ static int altera_pcie_parse_dt(struct altera_pcie *pcie)
cra = platform_get_resource_byname(pdev, IORESOURCE_MEM, "Cra");
pcie->cra_base = devm_ioremap_resource(dev, cra);
- if (IS_ERR(pcie->cra_base)) {
- dev_err(dev, "failed to map cra memory\n");
+ if (IS_ERR(pcie->cra_base))
return PTR_ERR(pcie->cra_base);
- }
/* setup IRQ */
pcie->irq = platform_get_irq(pdev, 0);
@@ -641,8 +639,4 @@ static struct platform_driver altera_pcie_driver = {
},
};
-static int altera_pcie_init(void)
-{
- return platform_driver_register(&altera_pcie_driver);
-}
-device_initcall(altera_pcie_init);
+builtin_platform_driver(altera_pcie_driver);