summaryrefslogtreecommitdiffstats
path: root/drivers/pci/controller/pci-host-generic.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2020-04-10 01:49:23 +0200
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2020-05-07 10:29:43 +0200
commitb2f75a41eaa6bfc4aa6f6a1faefbf21c2c8d1588 (patch)
treee4527b595973b4703a0f34f25f47f1f590295deb /drivers/pci/controller/pci-host-generic.c
parentPCI: host-generic: Support building as modules (diff)
downloadlinux-b2f75a41eaa6bfc4aa6f6a1faefbf21c2c8d1588.tar.xz
linux-b2f75a41eaa6bfc4aa6f6a1faefbf21c2c8d1588.zip
PCI: host-generic: Eliminate pci_host_common_probe wrappers
Most ECAM host drivers are just different pci_ecam_ops which can be DT match table data. That's already the case in some cases, but let's do that for all the ECAM drivers. Then we can use of_device_get_match_data() in pci_host_common_probe() and eliminate the probe wrapper functions and use pci_host_common_probe() directly for probe. Link: https://lore.kernel.org/r/20200409234923.21598-4-robh@kernel.org Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Cc: Zhou Wang <wangzhou1@hisilicon.com> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Cc: Andrew Murray <amurray@thegoodpenguin.co.uk> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Will Deacon <will@kernel.org> Cc: Robert Richter <rrichter@marvell.com> Cc: Marc Gonzalez <marc.w.gonzalez@free.fr> Cc: Mans Rullgard <mans@mansr.com> Cc: linux-pci@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org
Diffstat (limited to 'drivers/pci/controller/pci-host-generic.c')
-rw-r--r--drivers/pci/controller/pci-host-generic.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/pci/controller/pci-host-generic.c b/drivers/pci/controller/pci-host-generic.c
index fd8cff61de14..b51977abfdf1 100644
--- a/drivers/pci/controller/pci-host-generic.c
+++ b/drivers/pci/controller/pci-host-generic.c
@@ -11,8 +11,6 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
-#include <linux/of_address.h>
-#include <linux/of_pci.h>
#include <linux/pci-ecam.h>
#include <linux/platform_device.h>
@@ -79,23 +77,12 @@ static const struct of_device_id gen_pci_of_match[] = {
};
MODULE_DEVICE_TABLE(of, gen_pci_of_match);
-static int gen_pci_probe(struct platform_device *pdev)
-{
- const struct of_device_id *of_id;
- struct pci_ecam_ops *ops;
-
- of_id = of_match_node(gen_pci_of_match, pdev->dev.of_node);
- ops = (struct pci_ecam_ops *)of_id->data;
-
- return pci_host_common_probe(pdev, ops);
-}
-
static struct platform_driver gen_pci_driver = {
.driver = {
.name = "pci-host-generic",
.of_match_table = gen_pci_of_match,
},
- .probe = gen_pci_probe,
+ .probe = pci_host_common_probe,
.remove = pci_host_common_remove,
};
module_platform_driver(gen_pci_driver);