diff options
author | Rob Herring <robh@kernel.org> | 2018-08-29 14:34:40 -0400 |
---|---|---|
committer | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2018-09-25 04:40:03 -0400 |
commit | de17c5200237e93a2de1188e5cf885686ac8f79d (patch) | |
tree | 5c3d9c9cbf10fb5a3712095b8dd28b951481b3e2 /drivers/pci/controller/pcie-cadence-host.c | |
parent | 7876320f88802b22d4e2daf7eb027dd14175a0f8 (diff) |
PCI: Remove unnecessary check of device_type == pci
PCI host drivers have already matched on compatible strings, so checking
device_type is redundant. Also, device_type is considered deprecated for
FDT though we've still been requiring it for PCI hosts as it is useful
for finding PCI buses.
Signed-off-by: Rob Herring <robh@kernel.org>
[lorenzo.pieralisi@arm.com: reformatted the log]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Alan Douglas <adouglas@cadence.com>
Acked-by: Subrahmaya Lingappa <l.subrahmanya@mobiveil.co.in>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Alan Douglas <adouglas@cadence.com>
Cc: Subrahmanya Lingappa <l.subrahmanya@mobiveil.co.in>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: linux-pci@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Diffstat (limited to 'drivers/pci/controller/pcie-cadence-host.c')
-rw-r--r-- | drivers/pci/controller/pcie-cadence-host.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/pci/controller/pcie-cadence-host.c b/drivers/pci/controller/pcie-cadence-host.c index ec394f6a19c8..97e251090b4f 100644 --- a/drivers/pci/controller/pcie-cadence-host.c +++ b/drivers/pci/controller/pcie-cadence-host.c | |||
@@ -235,7 +235,6 @@ static int cdns_pcie_host_init(struct device *dev, | |||
235 | 235 | ||
236 | static int cdns_pcie_host_probe(struct platform_device *pdev) | 236 | static int cdns_pcie_host_probe(struct platform_device *pdev) |
237 | { | 237 | { |
238 | const char *type; | ||
239 | struct device *dev = &pdev->dev; | 238 | struct device *dev = &pdev->dev; |
240 | struct device_node *np = dev->of_node; | 239 | struct device_node *np = dev->of_node; |
241 | struct pci_host_bridge *bridge; | 240 | struct pci_host_bridge *bridge; |
@@ -268,12 +267,6 @@ static int cdns_pcie_host_probe(struct platform_device *pdev) | |||
268 | rc->device_id = 0xffff; | 267 | rc->device_id = 0xffff; |
269 | of_property_read_u16(np, "device-id", &rc->device_id); | 268 | of_property_read_u16(np, "device-id", &rc->device_id); |
270 | 269 | ||
271 | type = of_get_property(np, "device_type", NULL); | ||
272 | if (!type || strcmp(type, "pci")) { | ||
273 | dev_err(dev, "invalid \"device_type\" %s\n", type); | ||
274 | return -EINVAL; | ||
275 | } | ||
276 | |||
277 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "reg"); | 270 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "reg"); |
278 | pcie->reg_base = devm_ioremap_resource(dev, res); | 271 | pcie->reg_base = devm_ioremap_resource(dev, res); |
279 | if (IS_ERR(pcie->reg_base)) { | 272 | if (IS_ERR(pcie->reg_base)) { |