]> Git Repo - linux.git/blobdiff - drivers/pci/controller/pci-host-generic.c
ASoC: simple-card: Use snd_soc_of_parse_aux_devs()
[linux.git] / drivers / pci / controller / pci-host-generic.c
index 75a2fb930d4bd2af088362a9491c8363056e835e..b51977abfdf1c860f435bca8d6001e14024ac447 100644 (file)
 
 #include <linux/kernel.h>
 #include <linux/init.h>
-#include <linux/of_address.h>
-#include <linux/of_pci.h>
+#include <linux/module.h>
 #include <linux/pci-ecam.h>
 #include <linux/platform_device.h>
 
-static struct pci_ecam_ops gen_pci_cfg_cam_bus_ops = {
+static const struct pci_ecam_ops gen_pci_cfg_cam_bus_ops = {
        .bus_shift      = 16,
        .pci_ops        = {
                .map_bus        = pci_ecam_map_bus,
@@ -49,7 +48,7 @@ static void __iomem *pci_dw_ecam_map_bus(struct pci_bus *bus,
        return pci_ecam_map_bus(bus, devfn, where);
 }
 
-static struct pci_ecam_ops pci_dw_ecam_bus_ops = {
+static const struct pci_ecam_ops pci_dw_ecam_bus_ops = {
        .bus_shift      = 20,
        .pci_ops        = {
                .map_bus        = pci_dw_ecam_map_bus,
@@ -76,25 +75,16 @@ static const struct of_device_id 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);
-}
+MODULE_DEVICE_TABLE(of, gen_pci_of_match);
 
 static struct platform_driver gen_pci_driver = {
        .driver = {
                .name = "pci-host-generic",
                .of_match_table = gen_pci_of_match,
-               .suppress_bind_attrs = true,
        },
-       .probe = gen_pci_probe,
+       .probe = pci_host_common_probe,
        .remove = pci_host_common_remove,
 };
-builtin_platform_driver(gen_pci_driver);
+module_platform_driver(gen_pci_driver);
+
+MODULE_LICENSE("GPL v2");
This page took 0.045182 seconds and 4 git commands to generate.