Explorar o código

Merge branches 'pci/host-keystone', 'pci/host-layerscape', 'pci/host-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()
Bjorn Helgaas %!s(int64=10) %!d(string=hai) anos

+ 1 - 1
drivers/pci/host/pci-keystone.c

@@ -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++) {
 	for (temp = 0; temp < max_host_irqs; temp++) {
 		host_irqs[temp] = irq_of_parse_and_map(*np_temp, temp);
 		host_irqs[temp] = irq_of_parse_and_map(*np_temp, temp);
-		if (host_irqs[temp] < 0)
+		if (!host_irqs[temp])
 			break;
 			break;
 	}
 	}
 	if (temp) {
 	if (temp) {

+ 0 - 1
drivers/pci/host/pci-layerscape.c

@@ -167,7 +167,6 @@ MODULE_DEVICE_TABLE(of, ls_pcie_of_match);
 static struct platform_driver ls_pcie_driver = {
 static struct platform_driver ls_pcie_driver = {
 	.driver = {
 	.driver = {
 		.name = "layerscape-pcie",
 		.name = "layerscape-pcie",
-		.owner = THIS_MODULE,
 		.of_match_table = ls_pcie_of_match,
 		.of_match_table = ls_pcie_of_match,
 	},
 	},
 };
 };

+ 0 - 13
drivers/pci/host/pci-tegra.c

@@ -625,19 +625,6 @@ static void tegra_pcie_port_free(struct tegra_pcie_port *port)
 	devm_kfree(pcie->dev, 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 */
 /* Tegra PCIE root complex wrongly reports device class */
 static void tegra_pcie_fixup_class(struct pci_dev *dev)
 static void tegra_pcie_fixup_class(struct pci_dev *dev)
 {
 {

+ 2 - 2
drivers/pci/host/pcie-rcar.c

@@ -754,7 +754,7 @@ static int rcar_pcie_get_resources(struct platform_device *pdev,
 		goto err_map_reg;
 		goto err_map_reg;
 
 
 	i = irq_of_parse_and_map(pdev->dev.of_node, 0);
 	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");
 		dev_err(pcie->dev, "cannot get platform resources for msi interrupt\n");
 		err = -ENOENT;
 		err = -ENOENT;
 		goto err_map_reg;
 		goto err_map_reg;
@@ -762,7 +762,7 @@ static int rcar_pcie_get_resources(struct platform_device *pdev,
 	pcie->msi.irq1 = i;
 	pcie->msi.irq1 = i;
 
 
 	i = irq_of_parse_and_map(pdev->dev.of_node, 1);
 	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");
 		dev_err(pcie->dev, "cannot get platform resources for msi interrupt\n");
 		err = -ENOENT;
 		err = -ENOENT;
 		goto err_map_reg;
 		goto err_map_reg;