hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/pci/controller/pci-thunder-pem.c
....@@ -6,6 +6,7 @@
66 #include <linux/bitfield.h>
77 #include <linux/kernel.h>
88 #include <linux/init.h>
9
+#include <linux/pci.h>
910 #include <linux/of_address.h>
1011 #include <linux/of_pci.h>
1112 #include <linux/pci-acpi.h>
....@@ -403,7 +404,7 @@
403404 return thunder_pem_init(dev, cfg, res_pem);
404405 }
405406
406
-struct pci_ecam_ops thunder_pem_ecam_ops = {
407
+const struct pci_ecam_ops thunder_pem_ecam_ops = {
407408 .bus_shift = 24,
408409 .init = thunder_pem_acpi_init,
409410 .pci_ops = {
....@@ -440,7 +441,7 @@
440441 return thunder_pem_init(dev, cfg, res_pem);
441442 }
442443
443
-static struct pci_ecam_ops pci_thunder_pem_ops = {
444
+static const struct pci_ecam_ops pci_thunder_pem_ops = {
444445 .bus_shift = 24,
445446 .init = thunder_pem_platform_init,
446447 .pci_ops = {
....@@ -451,14 +452,12 @@
451452 };
452453
453454 static const struct of_device_id thunder_pem_of_match[] = {
454
- { .compatible = "cavium,pci-host-thunder-pem" },
455
+ {
456
+ .compatible = "cavium,pci-host-thunder-pem",
457
+ .data = &pci_thunder_pem_ops,
458
+ },
455459 { },
456460 };
457
-
458
-static int thunder_pem_probe(struct platform_device *pdev)
459
-{
460
- return pci_host_common_probe(pdev, &pci_thunder_pem_ops);
461
-}
462461
463462 static struct platform_driver thunder_pem_driver = {
464463 .driver = {
....@@ -466,7 +465,7 @@
466465 .of_match_table = thunder_pem_of_match,
467466 .suppress_bind_attrs = true,
468467 },
469
- .probe = thunder_pem_probe,
468
+ .probe = pci_host_common_probe,
470469 };
471470 builtin_platform_driver(thunder_pem_driver);
472471