.. | .. |
---|
6 | 6 | #include <linux/bitfield.h> |
---|
7 | 7 | #include <linux/kernel.h> |
---|
8 | 8 | #include <linux/init.h> |
---|
| 9 | +#include <linux/pci.h> |
---|
9 | 10 | #include <linux/of_address.h> |
---|
10 | 11 | #include <linux/of_pci.h> |
---|
11 | 12 | #include <linux/pci-acpi.h> |
---|
.. | .. |
---|
403 | 404 | return thunder_pem_init(dev, cfg, res_pem); |
---|
404 | 405 | } |
---|
405 | 406 | |
---|
406 | | -struct pci_ecam_ops thunder_pem_ecam_ops = { |
---|
| 407 | +const struct pci_ecam_ops thunder_pem_ecam_ops = { |
---|
407 | 408 | .bus_shift = 24, |
---|
408 | 409 | .init = thunder_pem_acpi_init, |
---|
409 | 410 | .pci_ops = { |
---|
.. | .. |
---|
440 | 441 | return thunder_pem_init(dev, cfg, res_pem); |
---|
441 | 442 | } |
---|
442 | 443 | |
---|
443 | | -static struct pci_ecam_ops pci_thunder_pem_ops = { |
---|
| 444 | +static const struct pci_ecam_ops pci_thunder_pem_ops = { |
---|
444 | 445 | .bus_shift = 24, |
---|
445 | 446 | .init = thunder_pem_platform_init, |
---|
446 | 447 | .pci_ops = { |
---|
.. | .. |
---|
451 | 452 | }; |
---|
452 | 453 | |
---|
453 | 454 | 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 | + }, |
---|
455 | 459 | { }, |
---|
456 | 460 | }; |
---|
457 | | - |
---|
458 | | -static int thunder_pem_probe(struct platform_device *pdev) |
---|
459 | | -{ |
---|
460 | | - return pci_host_common_probe(pdev, &pci_thunder_pem_ops); |
---|
461 | | -} |
---|
462 | 461 | |
---|
463 | 462 | static struct platform_driver thunder_pem_driver = { |
---|
464 | 463 | .driver = { |
---|
.. | .. |
---|
466 | 465 | .of_match_table = thunder_pem_of_match, |
---|
467 | 466 | .suppress_bind_attrs = true, |
---|
468 | 467 | }, |
---|
469 | | - .probe = thunder_pem_probe, |
---|
| 468 | + .probe = pci_host_common_probe, |
---|
470 | 469 | }; |
---|
471 | 470 | builtin_platform_driver(thunder_pem_driver); |
---|
472 | 471 | |
---|