hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/pci/controller/pci-thunder-ecam.c
....@@ -345,7 +345,7 @@
345345 return pci_generic_config_write(bus, devfn, where, size, val);
346346 }
347347
348
-struct pci_ecam_ops pci_thunder_ecam_ops = {
348
+const struct pci_ecam_ops pci_thunder_ecam_ops = {
349349 .bus_shift = 20,
350350 .pci_ops = {
351351 .map_bus = pci_ecam_map_bus,
....@@ -357,14 +357,12 @@
357357 #ifdef CONFIG_PCI_HOST_THUNDER_ECAM
358358
359359 static const struct of_device_id thunder_ecam_of_match[] = {
360
- { .compatible = "cavium,pci-host-thunder-ecam" },
360
+ {
361
+ .compatible = "cavium,pci-host-thunder-ecam",
362
+ .data = &pci_thunder_ecam_ops,
363
+ },
361364 { },
362365 };
363
-
364
-static int thunder_ecam_probe(struct platform_device *pdev)
365
-{
366
- return pci_host_common_probe(pdev, &pci_thunder_ecam_ops);
367
-}
368366
369367 static struct platform_driver thunder_ecam_driver = {
370368 .driver = {
....@@ -372,7 +370,7 @@
372370 .of_match_table = thunder_ecam_of_match,
373371 .suppress_bind_attrs = true,
374372 },
375
- .probe = thunder_ecam_probe,
373
+ .probe = pci_host_common_probe,
376374 };
377375 builtin_platform_driver(thunder_ecam_driver);
378376