Skip to content

Commit

Permalink
Merge branches 'pci/host-keystone', 'pci/host-layerscape', 'pci/host-…
Browse files Browse the repository at this point in the history
…rcar' and 'pci/host-tegra' into next

* pci/host-keystone:
  PCI: keystone: Fix error handling of irq_of_parse_and_map()

* pci/host-layerscape:
  PCI: layerscape: Fix platform_no_drv_owner.cocci warnings

* pci/host-rcar:
  PCI: rcar: Fix error handling of irq_of_parse_and_map()

* pci/host-tegra:
  PCI: tegra: Remove unnecessary tegra_pcie_fixup_bridge()
  • Loading branch information
Bjorn Helgaas committed Dec 29, 2014
5 parents 85aae3f + ea3651f + 80f6d91 + c51d411 + 19bd9c0 commit 75f30c3
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 17 deletions.
2 changes: 1 addition & 1 deletion drivers/pci/host/pci-keystone.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ static int ks_pcie_get_irq_controller_info(struct keystone_pcie *ks_pcie,
*/
for (temp = 0; temp < max_host_irqs; temp++) {
host_irqs[temp] = irq_of_parse_and_map(*np_temp, temp);
if (host_irqs[temp] < 0)
if (!host_irqs[temp])
break;
}
if (temp) {
Expand Down
1 change: 0 additions & 1 deletion drivers/pci/host/pci-layerscape.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ MODULE_DEVICE_TABLE(of, ls_pcie_of_match);
static struct platform_driver ls_pcie_driver = {
.driver = {
.name = "layerscape-pcie",
.owner = THIS_MODULE,
.of_match_table = ls_pcie_of_match,
},
};
Expand Down
13 changes: 0 additions & 13 deletions drivers/pci/host/pci-tegra.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,19 +625,6 @@ static void tegra_pcie_port_free(struct tegra_pcie_port *port)
devm_kfree(pcie->dev, port);
}

static void tegra_pcie_fixup_bridge(struct pci_dev *dev)
{
u16 reg;

if ((dev->class >> 16) == PCI_BASE_CLASS_BRIDGE) {
pci_read_config_word(dev, PCI_COMMAND, &reg);
reg |= (PCI_COMMAND_IO | PCI_COMMAND_MEMORY |
PCI_COMMAND_MASTER | PCI_COMMAND_SERR);
pci_write_config_word(dev, PCI_COMMAND, reg);
}
}
DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, tegra_pcie_fixup_bridge);

/* Tegra PCIE root complex wrongly reports device class */
static void tegra_pcie_fixup_class(struct pci_dev *dev)
{
Expand Down
4 changes: 2 additions & 2 deletions drivers/pci/host/pcie-rcar.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,15 +754,15 @@ static int rcar_pcie_get_resources(struct platform_device *pdev,
goto err_map_reg;

i = irq_of_parse_and_map(pdev->dev.of_node, 0);
if (i < 0) {
if (!i) {
dev_err(pcie->dev, "cannot get platform resources for msi interrupt\n");
err = -ENOENT;
goto err_map_reg;
}
pcie->msi.irq1 = i;

i = irq_of_parse_and_map(pdev->dev.of_node, 1);
if (i < 0) {
if (!i) {
dev_err(pcie->dev, "cannot get platform resources for msi interrupt\n");
err = -ENOENT;
goto err_map_reg;
Expand Down

0 comments on commit 75f30c3

Please sign in to comment.