diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2016-09-01 10:04:28 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-09-01 10:04:28 -0400 |
commit | a4589a660662d16336353b1c66ad18e0a0a3eb1e (patch) | |
tree | 1cd87ddc921ed18859753375a522e0cdb62239f8 | |
parent | 29b4817d4018df78086157ea3a55c1d9424a7cfc (diff) | |
parent | 70626d88385174397b8a17d767282e5600e67415 (diff) |
Merge branch 'pci/demodularize' into next
* pci/demodularize:
PCI: pciehp: Make explicitly non-modular
PCI: hotplug: Make core explicitly non-modular
PCI: xilinx-nwl: Make explicitly non-modular
PCI: xilinx: Make explicitly non-modular
PCI: qcom: Make explicitly non-modular
PCI: dra7xx: Make explicitly non-modular
PCI/AER: Make explicitly non-modular
PCI/PME: Make explicitly non-modular
PCI: Make DPC explicitly non-modular
PCI: generic: Make explicitly non-modular
PCI: exynos: Make explicitly non-modular
PCI: designware: Make explicitly non-modular
PCI: spear: Make explicitly non-modular
PCI: portdrv: Make explicitly non-modular
PCI: imx6: Make explicitly non-modular
PCI: altera: Make explicitly non-modular
PCI: altera: Make MSI explicitly non-modular
-rw-r--r-- | drivers/pci/host/pci-dra7xx.c | 31 | ||||
-rw-r--r-- | drivers/pci/host/pci-exynos.c | 7 | ||||
-rw-r--r-- | drivers/pci/host/pci-host-common.c | 7 | ||||
-rw-r--r-- | drivers/pci/host/pci-imx6.c | 9 | ||||
-rw-r--r-- | drivers/pci/host/pcie-altera-msi.c | 10 | ||||
-rw-r--r-- | drivers/pci/host/pcie-altera.c | 12 | ||||
-rw-r--r-- | drivers/pci/host/pcie-designware.c | 5 | ||||
-rw-r--r-- | drivers/pci/host/pcie-qcom.c | 28 | ||||
-rw-r--r-- | drivers/pci/host/pcie-spear13xx.c | 11 | ||||
-rw-r--r-- | drivers/pci/host/pcie-xilinx-nwl.c | 53 | ||||
-rw-r--r-- | drivers/pci/host/pcie-xilinx.c | 53 | ||||
-rw-r--r-- | drivers/pci/hotplug/cpci_hotplug.h | 2 | ||||
-rw-r--r-- | drivers/pci/hotplug/cpci_hotplug_core.c | 10 | ||||
-rw-r--r-- | drivers/pci/hotplug/pci_hotplug_core.c | 18 | ||||
-rw-r--r-- | drivers/pci/hotplug/pciehp_core.c | 20 | ||||
-rw-r--r-- | drivers/pci/pcie/aer/aerdrv.c | 18 | ||||
-rw-r--r-- | drivers/pci/pcie/pcie-dpc.c | 18 | ||||
-rw-r--r-- | drivers/pci/pcie/pme.c | 16 | ||||
-rw-r--r-- | drivers/pci/pcie/portdrv_pci.c | 17 |
19 files changed, 51 insertions, 294 deletions
diff --git a/drivers/pci/host/pci-dra7xx.c b/drivers/pci/host/pci-dra7xx.c index 81b3949a26db..19223ed2e619 100644 --- a/drivers/pci/host/pci-dra7xx.c +++ b/drivers/pci/host/pci-dra7xx.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/irq.h> | 15 | #include <linux/irq.h> |
16 | #include <linux/irqdomain.h> | 16 | #include <linux/irqdomain.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/module.h> | 18 | #include <linux/init.h> |
19 | #include <linux/of_gpio.h> | 19 | #include <linux/of_gpio.h> |
20 | #include <linux/pci.h> | 20 | #include <linux/pci.h> |
21 | #include <linux/phy/phy.h> | 21 | #include <linux/phy/phy.h> |
@@ -443,25 +443,6 @@ err_phy: | |||
443 | return ret; | 443 | return ret; |
444 | } | 444 | } |
445 | 445 | ||
446 | static int __exit dra7xx_pcie_remove(struct platform_device *pdev) | ||
447 | { | ||
448 | struct dra7xx_pcie *dra7xx = platform_get_drvdata(pdev); | ||
449 | struct pcie_port *pp = &dra7xx->pp; | ||
450 | struct device *dev = &pdev->dev; | ||
451 | int count = dra7xx->phy_count; | ||
452 | |||
453 | if (pp->irq_domain) | ||
454 | irq_domain_remove(pp->irq_domain); | ||
455 | pm_runtime_put(dev); | ||
456 | pm_runtime_disable(dev); | ||
457 | while (count--) { | ||
458 | phy_power_off(dra7xx->phy[count]); | ||
459 | phy_exit(dra7xx->phy[count]); | ||
460 | } | ||
461 | |||
462 | return 0; | ||
463 | } | ||
464 | |||
465 | #ifdef CONFIG_PM_SLEEP | 446 | #ifdef CONFIG_PM_SLEEP |
466 | static int dra7xx_pcie_suspend(struct device *dev) | 447 | static int dra7xx_pcie_suspend(struct device *dev) |
467 | { | 448 | { |
@@ -545,19 +526,13 @@ static const struct of_device_id of_dra7xx_pcie_match[] = { | |||
545 | { .compatible = "ti,dra7-pcie", }, | 526 | { .compatible = "ti,dra7-pcie", }, |
546 | {}, | 527 | {}, |
547 | }; | 528 | }; |
548 | MODULE_DEVICE_TABLE(of, of_dra7xx_pcie_match); | ||
549 | 529 | ||
550 | static struct platform_driver dra7xx_pcie_driver = { | 530 | static struct platform_driver dra7xx_pcie_driver = { |
551 | .remove = __exit_p(dra7xx_pcie_remove), | ||
552 | .driver = { | 531 | .driver = { |
553 | .name = "dra7-pcie", | 532 | .name = "dra7-pcie", |
554 | .of_match_table = of_dra7xx_pcie_match, | 533 | .of_match_table = of_dra7xx_pcie_match, |
534 | .suppress_bind_attrs = true, | ||
555 | .pm = &dra7xx_pcie_pm_ops, | 535 | .pm = &dra7xx_pcie_pm_ops, |
556 | }, | 536 | }, |
557 | }; | 537 | }; |
558 | 538 | builtin_platform_driver_probe(dra7xx_pcie_driver, dra7xx_pcie_probe); | |
559 | module_platform_driver_probe(dra7xx_pcie_driver, dra7xx_pcie_probe); | ||
560 | |||
561 | MODULE_AUTHOR("Kishon Vijay Abraham I <kishon@ti.com>"); | ||
562 | MODULE_DESCRIPTION("TI PCIe controller driver"); | ||
563 | MODULE_LICENSE("GPL v2"); | ||
diff --git a/drivers/pci/host/pci-exynos.c b/drivers/pci/host/pci-exynos.c index 219976103efc..c3ae9c7a6e33 100644 --- a/drivers/pci/host/pci-exynos.c +++ b/drivers/pci/host/pci-exynos.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/gpio.h> | 16 | #include <linux/gpio.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/module.h> | 19 | #include <linux/init.h> |
20 | #include <linux/of_gpio.h> | 20 | #include <linux/of_gpio.h> |
21 | #include <linux/pci.h> | 21 | #include <linux/pci.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
@@ -624,7 +624,6 @@ static const struct of_device_id exynos_pcie_of_match[] = { | |||
624 | { .compatible = "samsung,exynos5440-pcie", }, | 624 | { .compatible = "samsung,exynos5440-pcie", }, |
625 | {}, | 625 | {}, |
626 | }; | 626 | }; |
627 | MODULE_DEVICE_TABLE(of, exynos_pcie_of_match); | ||
628 | 627 | ||
629 | static struct platform_driver exynos_pcie_driver = { | 628 | static struct platform_driver exynos_pcie_driver = { |
630 | .remove = __exit_p(exynos_pcie_remove), | 629 | .remove = __exit_p(exynos_pcie_remove), |
@@ -641,7 +640,3 @@ static int __init exynos_pcie_init(void) | |||
641 | return platform_driver_probe(&exynos_pcie_driver, exynos_pcie_probe); | 640 | return platform_driver_probe(&exynos_pcie_driver, exynos_pcie_probe); |
642 | } | 641 | } |
643 | subsys_initcall(exynos_pcie_init); | 642 | subsys_initcall(exynos_pcie_init); |
644 | |||
645 | MODULE_AUTHOR("Jingoo Han <jg1.han@samsung.com>"); | ||
646 | MODULE_DESCRIPTION("Samsung PCIe host controller driver"); | ||
647 | MODULE_LICENSE("GPL v2"); | ||
diff --git a/drivers/pci/host/pci-host-common.c b/drivers/pci/host/pci-host-common.c index 9d9d34e959b6..946382fd4ea1 100644 --- a/drivers/pci/host/pci-host-common.c +++ b/drivers/pci/host/pci-host-common.c | |||
@@ -1,4 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Generic PCI host driver common code | ||
3 | * | ||
2 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
3 | * it under the terms of the GNU General Public License version 2 as | 5 | * it under the terms of the GNU General Public License version 2 as |
4 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
@@ -17,7 +19,6 @@ | |||
17 | */ | 19 | */ |
18 | 20 | ||
19 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
20 | #include <linux/module.h> | ||
21 | #include <linux/of_address.h> | 22 | #include <linux/of_address.h> |
22 | #include <linux/of_pci.h> | 23 | #include <linux/of_pci.h> |
23 | #include <linux/pci-ecam.h> | 24 | #include <linux/pci-ecam.h> |
@@ -162,7 +163,3 @@ int pci_host_common_probe(struct platform_device *pdev, | |||
162 | pci_bus_add_devices(bus); | 163 | pci_bus_add_devices(bus); |
163 | return 0; | 164 | return 0; |
164 | } | 165 | } |
165 | |||
166 | MODULE_DESCRIPTION("Generic PCI host driver common code"); | ||
167 | MODULE_AUTHOR("Will Deacon <will.deacon@arm.com>"); | ||
168 | MODULE_LICENSE("GPL v2"); | ||
diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c index b741a36a67f3..ead4a5c3480b 100644 --- a/drivers/pci/host/pci-imx6.c +++ b/drivers/pci/host/pci-imx6.c | |||
@@ -739,7 +739,6 @@ static const struct of_device_id imx6_pcie_of_match[] = { | |||
739 | { .compatible = "fsl,imx6qp-pcie", .data = (void *)IMX6QP, }, | 739 | { .compatible = "fsl,imx6qp-pcie", .data = (void *)IMX6QP, }, |
740 | {}, | 740 | {}, |
741 | }; | 741 | }; |
742 | MODULE_DEVICE_TABLE(of, imx6_pcie_of_match); | ||
743 | 742 | ||
744 | static struct platform_driver imx6_pcie_driver = { | 743 | static struct platform_driver imx6_pcie_driver = { |
745 | .driver = { | 744 | .driver = { |
@@ -749,14 +748,8 @@ static struct platform_driver imx6_pcie_driver = { | |||
749 | .shutdown = imx6_pcie_shutdown, | 748 | .shutdown = imx6_pcie_shutdown, |
750 | }; | 749 | }; |
751 | 750 | ||
752 | /* Freescale PCIe driver does not allow module unload */ | ||
753 | |||
754 | static int __init imx6_pcie_init(void) | 751 | static int __init imx6_pcie_init(void) |
755 | { | 752 | { |
756 | return platform_driver_probe(&imx6_pcie_driver, imx6_pcie_probe); | 753 | return platform_driver_probe(&imx6_pcie_driver, imx6_pcie_probe); |
757 | } | 754 | } |
758 | module_init(imx6_pcie_init); | 755 | device_initcall(imx6_pcie_init); |
759 | |||
760 | MODULE_AUTHOR("Sean Cross <xobs@kosagi.com>"); | ||
761 | MODULE_DESCRIPTION("Freescale i.MX6 PCIe host controller driver"); | ||
762 | MODULE_LICENSE("GPL v2"); | ||
diff --git a/drivers/pci/host/pcie-altera-msi.c b/drivers/pci/host/pcie-altera-msi.c index 99177f4ccde2..369e033449c6 100644 --- a/drivers/pci/host/pcie-altera-msi.c +++ b/drivers/pci/host/pcie-altera-msi.c | |||
@@ -1,4 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Altera PCIe MSI support | ||
3 | * | ||
4 | * Author: Ley Foon Tan <lftan@altera.com> | ||
5 | * | ||
2 | * Copyright Altera Corporation (C) 2013-2015. All rights reserved | 6 | * Copyright Altera Corporation (C) 2013-2015. All rights reserved |
3 | * | 7 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 8 | * This program is free software; you can redistribute it and/or modify it |
@@ -16,7 +20,7 @@ | |||
16 | 20 | ||
17 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
18 | #include <linux/irqchip/chained_irq.h> | 22 | #include <linux/irqchip/chained_irq.h> |
19 | #include <linux/module.h> | 23 | #include <linux/init.h> |
20 | #include <linux/msi.h> | 24 | #include <linux/msi.h> |
21 | #include <linux/of_address.h> | 25 | #include <linux/of_address.h> |
22 | #include <linux/of_irq.h> | 26 | #include <linux/of_irq.h> |
@@ -308,7 +312,3 @@ static int __init altera_msi_init(void) | |||
308 | return platform_driver_register(&altera_msi_driver); | 312 | return platform_driver_register(&altera_msi_driver); |
309 | } | 313 | } |
310 | subsys_initcall(altera_msi_init); | 314 | subsys_initcall(altera_msi_init); |
311 | |||
312 | MODULE_AUTHOR("Ley Foon Tan <lftan@altera.com>"); | ||
313 | MODULE_DESCRIPTION("Altera PCIe MSI support"); | ||
314 | MODULE_LICENSE("GPL v2"); | ||
diff --git a/drivers/pci/host/pcie-altera.c b/drivers/pci/host/pcie-altera.c index 2b7837650db8..48f2736a10cd 100644 --- a/drivers/pci/host/pcie-altera.c +++ b/drivers/pci/host/pcie-altera.c | |||
@@ -1,6 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright Altera Corporation (C) 2013-2015. All rights reserved | 2 | * Copyright Altera Corporation (C) 2013-2015. All rights reserved |
3 | * | 3 | * |
4 | * Author: Ley Foon Tan <lftan@altera.com> | ||
5 | * Description: Altera PCIe host controller driver | ||
6 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms and conditions of the GNU General Public License, | 8 | * under the terms and conditions of the GNU General Public License, |
6 | * version 2, as published by the Free Software Foundation. | 9 | * version 2, as published by the Free Software Foundation. |
@@ -17,7 +20,7 @@ | |||
17 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
18 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
19 | #include <linux/irqchip/chained_irq.h> | 22 | #include <linux/irqchip/chained_irq.h> |
20 | #include <linux/module.h> | 23 | #include <linux/init.h> |
21 | #include <linux/of_address.h> | 24 | #include <linux/of_address.h> |
22 | #include <linux/of_irq.h> | 25 | #include <linux/of_irq.h> |
23 | #include <linux/of_pci.h> | 26 | #include <linux/of_pci.h> |
@@ -568,7 +571,6 @@ static const struct of_device_id altera_pcie_of_match[] = { | |||
568 | { .compatible = "altr,pcie-root-port-1.0", }, | 571 | { .compatible = "altr,pcie-root-port-1.0", }, |
569 | {}, | 572 | {}, |
570 | }; | 573 | }; |
571 | MODULE_DEVICE_TABLE(of, altera_pcie_of_match); | ||
572 | 574 | ||
573 | static struct platform_driver altera_pcie_driver = { | 575 | static struct platform_driver altera_pcie_driver = { |
574 | .probe = altera_pcie_probe, | 576 | .probe = altera_pcie_probe, |
@@ -583,8 +585,4 @@ static int altera_pcie_init(void) | |||
583 | { | 585 | { |
584 | return platform_driver_register(&altera_pcie_driver); | 586 | return platform_driver_register(&altera_pcie_driver); |
585 | } | 587 | } |
586 | module_init(altera_pcie_init); | 588 | device_initcall(altera_pcie_init); |
587 | |||
588 | MODULE_AUTHOR("Ley Foon Tan <lftan@altera.com>"); | ||
589 | MODULE_DESCRIPTION("Altera PCIe host controller driver"); | ||
590 | MODULE_LICENSE("GPL v2"); | ||
diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c index 12afce19890b..16374202cb8b 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
15 | #include <linux/irqdomain.h> | 15 | #include <linux/irqdomain.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/module.h> | ||
18 | #include <linux/msi.h> | 17 | #include <linux/msi.h> |
19 | #include <linux/of_address.h> | 18 | #include <linux/of_address.h> |
20 | #include <linux/of_pci.h> | 19 | #include <linux/of_pci.h> |
@@ -802,7 +801,3 @@ void dw_pcie_setup_rc(struct pcie_port *pp) | |||
802 | val |= PORT_LOGIC_SPEED_CHANGE; | 801 | val |= PORT_LOGIC_SPEED_CHANGE; |
803 | dw_pcie_wr_own_conf(pp, PCIE_LINK_WIDTH_SPEED_CONTROL, 4, val); | 802 | dw_pcie_wr_own_conf(pp, PCIE_LINK_WIDTH_SPEED_CONTROL, 4, val); |
804 | } | 803 | } |
805 | |||
806 | MODULE_AUTHOR("Jingoo Han <jg1.han@samsung.com>"); | ||
807 | MODULE_DESCRIPTION("Designware PCIe host controller driver"); | ||
808 | MODULE_LICENSE("GPL v2"); | ||
diff --git a/drivers/pci/host/pcie-qcom.c b/drivers/pci/host/pcie-qcom.c index f2f90c50f75d..5ec2d440a6b7 100644 --- a/drivers/pci/host/pcie-qcom.c +++ b/drivers/pci/host/pcie-qcom.c | |||
@@ -1,7 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * Qualcomm PCIe root complex driver | ||
3 | * | ||
2 | * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. | 4 | * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. |
3 | * Copyright 2015 Linaro Limited. | 5 | * Copyright 2015 Linaro Limited. |
4 | * | 6 | * |
7 | * Author: Stanimir Varbanov <svarbanov@mm-sol.com> | ||
8 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License version 2 and | 10 | * it under the terms of the GNU General Public License version 2 and |
7 | * only version 2 as published by the Free Software Foundation. | 11 | * only version 2 as published by the Free Software Foundation. |
@@ -19,7 +23,7 @@ | |||
19 | #include <linux/io.h> | 23 | #include <linux/io.h> |
20 | #include <linux/iopoll.h> | 24 | #include <linux/iopoll.h> |
21 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
22 | #include <linux/module.h> | 26 | #include <linux/init.h> |
23 | #include <linux/of_device.h> | 27 | #include <linux/of_device.h> |
24 | #include <linux/of_gpio.h> | 28 | #include <linux/of_gpio.h> |
25 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
@@ -570,37 +574,19 @@ static int qcom_pcie_probe(struct platform_device *pdev) | |||
570 | return 0; | 574 | return 0; |
571 | } | 575 | } |
572 | 576 | ||
573 | static int qcom_pcie_remove(struct platform_device *pdev) | ||
574 | { | ||
575 | struct qcom_pcie *pcie = platform_get_drvdata(pdev); | ||
576 | |||
577 | qcom_ep_reset_assert(pcie); | ||
578 | phy_power_off(pcie->phy); | ||
579 | phy_exit(pcie->phy); | ||
580 | pcie->ops->deinit(pcie); | ||
581 | |||
582 | return 0; | ||
583 | } | ||
584 | |||
585 | static const struct of_device_id qcom_pcie_match[] = { | 577 | static const struct of_device_id qcom_pcie_match[] = { |
586 | { .compatible = "qcom,pcie-ipq8064", .data = &ops_v0 }, | 578 | { .compatible = "qcom,pcie-ipq8064", .data = &ops_v0 }, |
587 | { .compatible = "qcom,pcie-apq8064", .data = &ops_v0 }, | 579 | { .compatible = "qcom,pcie-apq8064", .data = &ops_v0 }, |
588 | { .compatible = "qcom,pcie-apq8084", .data = &ops_v1 }, | 580 | { .compatible = "qcom,pcie-apq8084", .data = &ops_v1 }, |
589 | { } | 581 | { } |
590 | }; | 582 | }; |
591 | MODULE_DEVICE_TABLE(of, qcom_pcie_match); | ||
592 | 583 | ||
593 | static struct platform_driver qcom_pcie_driver = { | 584 | static struct platform_driver qcom_pcie_driver = { |
594 | .probe = qcom_pcie_probe, | 585 | .probe = qcom_pcie_probe, |
595 | .remove = qcom_pcie_remove, | ||
596 | .driver = { | 586 | .driver = { |
597 | .name = "qcom-pcie", | 587 | .name = "qcom-pcie", |
588 | .suppress_bind_attrs = true, | ||
598 | .of_match_table = qcom_pcie_match, | 589 | .of_match_table = qcom_pcie_match, |
599 | }, | 590 | }, |
600 | }; | 591 | }; |
601 | 592 | builtin_platform_driver(qcom_pcie_driver); | |
602 | module_platform_driver(qcom_pcie_driver); | ||
603 | |||
604 | MODULE_AUTHOR("Stanimir Varbanov <svarbanov@mm-sol.com>"); | ||
605 | MODULE_DESCRIPTION("Qualcomm PCIe root complex driver"); | ||
606 | MODULE_LICENSE("GPL v2"); | ||
diff --git a/drivers/pci/host/pcie-spear13xx.c b/drivers/pci/host/pcie-spear13xx.c index a4060b85ab23..09aed85f275a 100644 --- a/drivers/pci/host/pcie-spear13xx.c +++ b/drivers/pci/host/pcie-spear13xx.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/clk.h> | 15 | #include <linux/clk.h> |
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/module.h> | 18 | #include <linux/init.h> |
19 | #include <linux/of.h> | 19 | #include <linux/of.h> |
20 | #include <linux/pci.h> | 20 | #include <linux/pci.h> |
21 | #include <linux/phy/phy.h> | 21 | #include <linux/phy/phy.h> |
@@ -355,7 +355,6 @@ static const struct of_device_id spear13xx_pcie_of_match[] = { | |||
355 | { .compatible = "st,spear1340-pcie", }, | 355 | { .compatible = "st,spear1340-pcie", }, |
356 | {}, | 356 | {}, |
357 | }; | 357 | }; |
358 | MODULE_DEVICE_TABLE(of, spear13xx_pcie_of_match); | ||
359 | 358 | ||
360 | static struct platform_driver spear13xx_pcie_driver = { | 359 | static struct platform_driver spear13xx_pcie_driver = { |
361 | .probe = spear13xx_pcie_probe, | 360 | .probe = spear13xx_pcie_probe, |
@@ -365,14 +364,8 @@ static struct platform_driver spear13xx_pcie_driver = { | |||
365 | }, | 364 | }, |
366 | }; | 365 | }; |
367 | 366 | ||
368 | /* SPEAr13xx PCIe driver does not allow module unload */ | ||
369 | |||
370 | static int __init spear13xx_pcie_init(void) | 367 | static int __init spear13xx_pcie_init(void) |
371 | { | 368 | { |
372 | return platform_driver_register(&spear13xx_pcie_driver); | 369 | return platform_driver_register(&spear13xx_pcie_driver); |
373 | } | 370 | } |
374 | module_init(spear13xx_pcie_init); | 371 | device_initcall(spear13xx_pcie_init); |
375 | |||
376 | MODULE_DESCRIPTION("ST Microelectronics SPEAr13xx PCIe host controller driver"); | ||
377 | MODULE_AUTHOR("Pratyush Anand <pratyush.anand@gmail.com>"); | ||
378 | MODULE_LICENSE("GPL v2"); | ||
diff --git a/drivers/pci/host/pcie-xilinx-nwl.c b/drivers/pci/host/pcie-xilinx-nwl.c index 0b597d9190b4..df7fb8b69658 100644 --- a/drivers/pci/host/pcie-xilinx-nwl.c +++ b/drivers/pci/host/pcie-xilinx-nwl.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/irq.h> | 15 | #include <linux/irq.h> |
16 | #include <linux/irqdomain.h> | 16 | #include <linux/irqdomain.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/module.h> | 18 | #include <linux/init.h> |
19 | #include <linux/msi.h> | 19 | #include <linux/msi.h> |
20 | #include <linux/of_address.h> | 20 | #include <linux/of_address.h> |
21 | #include <linux/of_pci.h> | 21 | #include <linux/of_pci.h> |
@@ -459,40 +459,6 @@ static const struct irq_domain_ops dev_msi_domain_ops = { | |||
459 | .free = nwl_irq_domain_free, | 459 | .free = nwl_irq_domain_free, |
460 | }; | 460 | }; |
461 | 461 | ||
462 | static void nwl_msi_free_irq_domain(struct nwl_pcie *pcie) | ||
463 | { | ||
464 | struct nwl_msi *msi = &pcie->msi; | ||
465 | |||
466 | if (msi->irq_msi0) | ||
467 | irq_set_chained_handler_and_data(msi->irq_msi0, NULL, NULL); | ||
468 | if (msi->irq_msi1) | ||
469 | irq_set_chained_handler_and_data(msi->irq_msi1, NULL, NULL); | ||
470 | |||
471 | if (msi->msi_domain) | ||
472 | irq_domain_remove(msi->msi_domain); | ||
473 | if (msi->dev_domain) | ||
474 | irq_domain_remove(msi->dev_domain); | ||
475 | |||
476 | kfree(msi->bitmap); | ||
477 | msi->bitmap = NULL; | ||
478 | } | ||
479 | |||
480 | static void nwl_pcie_free_irq_domain(struct nwl_pcie *pcie) | ||
481 | { | ||
482 | int i; | ||
483 | u32 irq; | ||
484 | |||
485 | for (i = 0; i < INTX_NUM; i++) { | ||
486 | irq = irq_find_mapping(pcie->legacy_irq_domain, i + 1); | ||
487 | if (irq > 0) | ||
488 | irq_dispose_mapping(irq); | ||
489 | } | ||
490 | if (pcie->legacy_irq_domain) | ||
491 | irq_domain_remove(pcie->legacy_irq_domain); | ||
492 | |||
493 | nwl_msi_free_irq_domain(pcie); | ||
494 | } | ||
495 | |||
496 | static int nwl_pcie_init_msi_irq_domain(struct nwl_pcie *pcie) | 462 | static int nwl_pcie_init_msi_irq_domain(struct nwl_pcie *pcie) |
497 | { | 463 | { |
498 | #ifdef CONFIG_PCI_MSI | 464 | #ifdef CONFIG_PCI_MSI |
@@ -867,25 +833,12 @@ error: | |||
867 | return err; | 833 | return err; |
868 | } | 834 | } |
869 | 835 | ||
870 | static int nwl_pcie_remove(struct platform_device *pdev) | ||
871 | { | ||
872 | struct nwl_pcie *pcie = platform_get_drvdata(pdev); | ||
873 | |||
874 | nwl_pcie_free_irq_domain(pcie); | ||
875 | platform_set_drvdata(pdev, NULL); | ||
876 | return 0; | ||
877 | } | ||
878 | |||
879 | static struct platform_driver nwl_pcie_driver = { | 836 | static struct platform_driver nwl_pcie_driver = { |
880 | .driver = { | 837 | .driver = { |
881 | .name = "nwl-pcie", | 838 | .name = "nwl-pcie", |
839 | .suppress_bind_attrs = true, | ||
882 | .of_match_table = nwl_pcie_of_match, | 840 | .of_match_table = nwl_pcie_of_match, |
883 | }, | 841 | }, |
884 | .probe = nwl_pcie_probe, | 842 | .probe = nwl_pcie_probe, |
885 | .remove = nwl_pcie_remove, | ||
886 | }; | 843 | }; |
887 | module_platform_driver(nwl_pcie_driver); | 844 | builtin_platform_driver(nwl_pcie_driver); |
888 | |||
889 | MODULE_AUTHOR("Xilinx, Inc"); | ||
890 | MODULE_DESCRIPTION("NWL PCIe driver"); | ||
891 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c index a30e01639557..7b7dbd22bccc 100644 --- a/drivers/pci/host/pcie-xilinx.c +++ b/drivers/pci/host/pcie-xilinx.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
19 | #include <linux/irqdomain.h> | 19 | #include <linux/irqdomain.h> |
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/module.h> | 21 | #include <linux/init.h> |
22 | #include <linux/msi.h> | 22 | #include <linux/msi.h> |
23 | #include <linux/of_address.h> | 23 | #include <linux/of_address.h> |
24 | #include <linux/of_pci.h> | 24 | #include <linux/of_pci.h> |
@@ -506,35 +506,6 @@ static irqreturn_t xilinx_pcie_intr_handler(int irq, void *data) | |||
506 | } | 506 | } |
507 | 507 | ||
508 | /** | 508 | /** |
509 | * xilinx_pcie_free_irq_domain - Free IRQ domain | ||
510 | * @port: PCIe port information | ||
511 | */ | ||
512 | static void xilinx_pcie_free_irq_domain(struct xilinx_pcie_port *port) | ||
513 | { | ||
514 | int i; | ||
515 | u32 irq, num_irqs; | ||
516 | |||
517 | /* Free IRQ Domain */ | ||
518 | if (IS_ENABLED(CONFIG_PCI_MSI)) { | ||
519 | |||
520 | free_pages(port->msi_pages, 0); | ||
521 | |||
522 | num_irqs = XILINX_NUM_MSI_IRQS; | ||
523 | } else { | ||
524 | /* INTx */ | ||
525 | num_irqs = 4; | ||
526 | } | ||
527 | |||
528 | for (i = 0; i < num_irqs; i++) { | ||
529 | irq = irq_find_mapping(port->irq_domain, i); | ||
530 | if (irq > 0) | ||
531 | irq_dispose_mapping(irq); | ||
532 | } | ||
533 | |||
534 | irq_domain_remove(port->irq_domain); | ||
535 | } | ||
536 | |||
537 | /** | ||
538 | * xilinx_pcie_init_irq_domain - Initialize IRQ domain | 509 | * xilinx_pcie_init_irq_domain - Initialize IRQ domain |
539 | * @port: PCIe port information | 510 | * @port: PCIe port information |
540 | * | 511 | * |
@@ -724,21 +695,6 @@ error: | |||
724 | return err; | 695 | return err; |
725 | } | 696 | } |
726 | 697 | ||
727 | /** | ||
728 | * xilinx_pcie_remove - Remove function | ||
729 | * @pdev: Platform device pointer | ||
730 | * | ||
731 | * Return: '0' always | ||
732 | */ | ||
733 | static int xilinx_pcie_remove(struct platform_device *pdev) | ||
734 | { | ||
735 | struct xilinx_pcie_port *port = platform_get_drvdata(pdev); | ||
736 | |||
737 | xilinx_pcie_free_irq_domain(port); | ||
738 | |||
739 | return 0; | ||
740 | } | ||
741 | |||
742 | static struct of_device_id xilinx_pcie_of_match[] = { | 698 | static struct of_device_id xilinx_pcie_of_match[] = { |
743 | { .compatible = "xlnx,axi-pcie-host-1.00.a", }, | 699 | { .compatible = "xlnx,axi-pcie-host-1.00.a", }, |
744 | {} | 700 | {} |
@@ -751,10 +707,5 @@ static struct platform_driver xilinx_pcie_driver = { | |||
751 | .suppress_bind_attrs = true, | 707 | .suppress_bind_attrs = true, |
752 | }, | 708 | }, |
753 | .probe = xilinx_pcie_probe, | 709 | .probe = xilinx_pcie_probe, |
754 | .remove = xilinx_pcie_remove, | ||
755 | }; | 710 | }; |
756 | module_platform_driver(xilinx_pcie_driver); | 711 | builtin_platform_driver(xilinx_pcie_driver); |
757 | |||
758 | MODULE_AUTHOR("Xilinx Inc"); | ||
759 | MODULE_DESCRIPTION("Xilinx AXI PCIe driver"); | ||
760 | MODULE_LICENSE("GPL v2"); | ||
diff --git a/drivers/pci/hotplug/cpci_hotplug.h b/drivers/pci/hotplug/cpci_hotplug.h index 555bcde3b196..60e66e027ebc 100644 --- a/drivers/pci/hotplug/cpci_hotplug.h +++ b/drivers/pci/hotplug/cpci_hotplug.h | |||
@@ -101,10 +101,8 @@ int cpci_unconfigure_slot(struct slot *slot); | |||
101 | 101 | ||
102 | #ifdef CONFIG_HOTPLUG_PCI_CPCI | 102 | #ifdef CONFIG_HOTPLUG_PCI_CPCI |
103 | int cpci_hotplug_init(int debug); | 103 | int cpci_hotplug_init(int debug); |
104 | void cpci_hotplug_exit(void); | ||
105 | #else | 104 | #else |
106 | static inline int cpci_hotplug_init(int debug) { return 0; } | 105 | static inline int cpci_hotplug_init(int debug) { return 0; } |
107 | static inline void cpci_hotplug_exit(void) { } | ||
108 | #endif | 106 | #endif |
109 | 107 | ||
110 | #endif /* _CPCI_HOTPLUG_H */ | 108 | #endif /* _CPCI_HOTPLUG_H */ |
diff --git a/drivers/pci/hotplug/cpci_hotplug_core.c b/drivers/pci/hotplug/cpci_hotplug_core.c index 7d3866c47312..7ec8a8f72c69 100644 --- a/drivers/pci/hotplug/cpci_hotplug_core.c +++ b/drivers/pci/hotplug/cpci_hotplug_core.c | |||
@@ -719,13 +719,3 @@ cpci_hotplug_init(int debug) | |||
719 | cpci_debug = debug; | 719 | cpci_debug = debug; |
720 | return 0; | 720 | return 0; |
721 | } | 721 | } |
722 | |||
723 | void __exit | ||
724 | cpci_hotplug_exit(void) | ||
725 | { | ||
726 | /* | ||
727 | * Clean everything up. | ||
728 | */ | ||
729 | cpci_hp_stop(); | ||
730 | cpci_hp_unregister_controller(controller); | ||
731 | } | ||
diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c index 9acd1997c6fe..fea0b8b33589 100644 --- a/drivers/pci/hotplug/pci_hotplug_core.c +++ b/drivers/pci/hotplug/pci_hotplug_core.c | |||
@@ -25,7 +25,7 @@ | |||
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/module.h> | 28 | #include <linux/module.h> /* try_module_get & module_put */ |
29 | #include <linux/moduleparam.h> | 29 | #include <linux/moduleparam.h> |
30 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
31 | #include <linux/types.h> | 31 | #include <linux/types.h> |
@@ -537,17 +537,11 @@ static int __init pci_hotplug_init(void) | |||
537 | info(DRIVER_DESC " version: " DRIVER_VERSION "\n"); | 537 | info(DRIVER_DESC " version: " DRIVER_VERSION "\n"); |
538 | return result; | 538 | return result; |
539 | } | 539 | } |
540 | device_initcall(pci_hotplug_init); | ||
540 | 541 | ||
541 | static void __exit pci_hotplug_exit(void) | 542 | /* |
542 | { | 543 | * not really modular, but the easiest way to keep compat with existing |
543 | cpci_hotplug_exit(); | 544 | * bootargs behaviour is to continue using module_param here. |
544 | } | 545 | */ |
545 | |||
546 | module_init(pci_hotplug_init); | ||
547 | module_exit(pci_hotplug_exit); | ||
548 | |||
549 | MODULE_AUTHOR(DRIVER_AUTHOR); | ||
550 | MODULE_DESCRIPTION(DRIVER_DESC); | ||
551 | MODULE_LICENSE("GPL"); | ||
552 | module_param(debug, bool, 0644); | 546 | module_param(debug, bool, 0644); |
553 | MODULE_PARM_DESC(debug, "Debugging mode enabled or not"); | 547 | MODULE_PARM_DESC(debug, "Debugging mode enabled or not"); |
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c index ac531e674a05..fb0f86335158 100644 --- a/drivers/pci/hotplug/pciehp_core.c +++ b/drivers/pci/hotplug/pciehp_core.c | |||
@@ -27,7 +27,6 @@ | |||
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/module.h> | ||
31 | #include <linux/moduleparam.h> | 30 | #include <linux/moduleparam.h> |
32 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
33 | #include <linux/slab.h> | 32 | #include <linux/slab.h> |
@@ -47,10 +46,10 @@ static bool pciehp_force; | |||
47 | #define DRIVER_AUTHOR "Dan Zink <dan.zink@compaq.com>, Greg Kroah-Hartman <greg@kroah.com>, Dely Sy <dely.l.sy@intel.com>" | 46 | #define DRIVER_AUTHOR "Dan Zink <dan.zink@compaq.com>, Greg Kroah-Hartman <greg@kroah.com>, Dely Sy <dely.l.sy@intel.com>" |
48 | #define DRIVER_DESC "PCI Express Hot Plug Controller Driver" | 47 | #define DRIVER_DESC "PCI Express Hot Plug Controller Driver" |
49 | 48 | ||
50 | MODULE_AUTHOR(DRIVER_AUTHOR); | 49 | /* |
51 | MODULE_DESCRIPTION(DRIVER_DESC); | 50 | * not really modular, but the easiest way to keep compat with existing |
52 | MODULE_LICENSE("GPL"); | 51 | * bootargs behaviour is to continue using module_param here. |
53 | 52 | */ | |
54 | module_param(pciehp_debug, bool, 0644); | 53 | module_param(pciehp_debug, bool, 0644); |
55 | module_param(pciehp_poll_mode, bool, 0644); | 54 | module_param(pciehp_poll_mode, bool, 0644); |
56 | module_param(pciehp_poll_time, int, 0644); | 55 | module_param(pciehp_poll_time, int, 0644); |
@@ -337,13 +336,4 @@ static int __init pcied_init(void) | |||
337 | 336 | ||
338 | return retval; | 337 | return retval; |
339 | } | 338 | } |
340 | 339 | device_initcall(pcied_init); | |
341 | static void __exit pcied_cleanup(void) | ||
342 | { | ||
343 | dbg("unload_pciehpd()\n"); | ||
344 | pcie_port_service_unregister(&hpdriver_portdrv); | ||
345 | info(DRIVER_DESC " version: " DRIVER_VERSION " unloaded\n"); | ||
346 | } | ||
347 | |||
348 | module_init(pcied_init); | ||
349 | module_exit(pcied_cleanup); | ||
diff --git a/drivers/pci/pcie/aer/aerdrv.c b/drivers/pci/pcie/aer/aerdrv.c index 48d21e0edd56..49805a48b81c 100644 --- a/drivers/pci/pcie/aer/aerdrv.c +++ b/drivers/pci/pcie/aer/aerdrv.c | |||
@@ -15,7 +15,6 @@ | |||
15 | * | 15 | * |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/module.h> | ||
19 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
20 | #include <linux/pci-acpi.h> | 19 | #include <linux/pci-acpi.h> |
21 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
@@ -37,9 +36,6 @@ | |||
37 | #define DRIVER_VERSION "v1.0" | 36 | #define DRIVER_VERSION "v1.0" |
38 | #define DRIVER_AUTHOR "tom.l.nguyen@intel.com" | 37 | #define DRIVER_AUTHOR "tom.l.nguyen@intel.com" |
39 | #define DRIVER_DESC "Root Port Advanced Error Reporting Driver" | 38 | #define DRIVER_DESC "Root Port Advanced Error Reporting Driver" |
40 | MODULE_AUTHOR(DRIVER_AUTHOR); | ||
41 | MODULE_DESCRIPTION(DRIVER_DESC); | ||
42 | MODULE_LICENSE("GPL"); | ||
43 | 39 | ||
44 | static int aer_probe(struct pcie_device *dev); | 40 | static int aer_probe(struct pcie_device *dev); |
45 | static void aer_remove(struct pcie_device *dev); | 41 | static void aer_remove(struct pcie_device *dev); |
@@ -417,16 +413,4 @@ static int __init aer_service_init(void) | |||
417 | return -ENXIO; | 413 | return -ENXIO; |
418 | return pcie_port_service_register(&aerdriver); | 414 | return pcie_port_service_register(&aerdriver); |
419 | } | 415 | } |
420 | 416 | device_initcall(aer_service_init); | |
421 | /** | ||
422 | * aer_service_exit - unregister AER root service driver | ||
423 | * | ||
424 | * Invoked when AER root service driver is unloaded. | ||
425 | */ | ||
426 | static void __exit aer_service_exit(void) | ||
427 | { | ||
428 | pcie_port_service_unregister(&aerdriver); | ||
429 | } | ||
430 | |||
431 | module_init(aer_service_init); | ||
432 | module_exit(aer_service_exit); | ||
diff --git a/drivers/pci/pcie/pcie-dpc.c b/drivers/pci/pcie/pcie-dpc.c index 250f87861786..9811b14d9ad8 100644 --- a/drivers/pci/pcie/pcie-dpc.c +++ b/drivers/pci/pcie/pcie-dpc.c | |||
@@ -1,5 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * PCI Express Downstream Port Containment services driver | 2 | * PCI Express Downstream Port Containment services driver |
3 | * Author: Keith Busch <keith.busch@intel.com> | ||
4 | * | ||
3 | * Copyright (C) 2016 Intel Corp. | 5 | * Copyright (C) 2016 Intel Corp. |
4 | * | 6 | * |
5 | * This file is subject to the terms and conditions of the GNU General Public | 7 | * This file is subject to the terms and conditions of the GNU General Public |
@@ -9,7 +11,7 @@ | |||
9 | 11 | ||
10 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
11 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
12 | #include <linux/module.h> | 14 | #include <linux/init.h> |
13 | #include <linux/pci.h> | 15 | #include <linux/pci.h> |
14 | #include <linux/pcieport_if.h> | 16 | #include <linux/pcieport_if.h> |
15 | 17 | ||
@@ -143,16 +145,4 @@ static int __init dpc_service_init(void) | |||
143 | { | 145 | { |
144 | return pcie_port_service_register(&dpcdriver); | 146 | return pcie_port_service_register(&dpcdriver); |
145 | } | 147 | } |
146 | 148 | device_initcall(dpc_service_init); | |
147 | static void __exit dpc_service_exit(void) | ||
148 | { | ||
149 | pcie_port_service_unregister(&dpcdriver); | ||
150 | } | ||
151 | |||
152 | MODULE_DESCRIPTION("PCI Express Downstream Port Containment driver"); | ||
153 | MODULE_AUTHOR("Keith Busch <keith.busch@intel.com>"); | ||
154 | MODULE_LICENSE("GPL"); | ||
155 | MODULE_VERSION("0.1"); | ||
156 | |||
157 | module_init(dpc_service_init); | ||
158 | module_exit(dpc_service_exit); | ||
diff --git a/drivers/pci/pcie/pme.c b/drivers/pci/pcie/pme.c index 1ae4c73e7a3c..884bad5320f8 100644 --- a/drivers/pci/pcie/pme.c +++ b/drivers/pci/pcie/pme.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * for more details. | 10 | * for more details. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/module.h> | ||
14 | #include <linux/pci.h> | 13 | #include <linux/pci.h> |
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
@@ -449,17 +448,6 @@ static int pcie_pme_resume(struct pcie_device *srv) | |||
449 | return 0; | 448 | return 0; |
450 | } | 449 | } |
451 | 450 | ||
452 | /** | ||
453 | * pcie_pme_remove - Prepare PCIe PME service device for removal. | ||
454 | * @srv - PCIe service device to remove. | ||
455 | */ | ||
456 | static void pcie_pme_remove(struct pcie_device *srv) | ||
457 | { | ||
458 | pcie_pme_suspend(srv); | ||
459 | free_irq(srv->irq, srv); | ||
460 | kfree(get_service_data(srv)); | ||
461 | } | ||
462 | |||
463 | static struct pcie_port_service_driver pcie_pme_driver = { | 451 | static struct pcie_port_service_driver pcie_pme_driver = { |
464 | .name = "pcie_pme", | 452 | .name = "pcie_pme", |
465 | .port_type = PCI_EXP_TYPE_ROOT_PORT, | 453 | .port_type = PCI_EXP_TYPE_ROOT_PORT, |
@@ -468,7 +456,6 @@ static struct pcie_port_service_driver pcie_pme_driver = { | |||
468 | .probe = pcie_pme_probe, | 456 | .probe = pcie_pme_probe, |
469 | .suspend = pcie_pme_suspend, | 457 | .suspend = pcie_pme_suspend, |
470 | .resume = pcie_pme_resume, | 458 | .resume = pcie_pme_resume, |
471 | .remove = pcie_pme_remove, | ||
472 | }; | 459 | }; |
473 | 460 | ||
474 | /** | 461 | /** |
@@ -478,5 +465,4 @@ static int __init pcie_pme_service_init(void) | |||
478 | { | 465 | { |
479 | return pcie_port_service_register(&pcie_pme_driver); | 466 | return pcie_port_service_register(&pcie_pme_driver); |
480 | } | 467 | } |
481 | 468 | device_initcall(pcie_pme_service_init); | |
482 | module_init(pcie_pme_service_init); | ||
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index 70d7ad8c6d17..79327cc14e7d 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c | |||
@@ -1,12 +1,13 @@ | |||
1 | /* | 1 | /* |
2 | * File: portdrv_pci.c | 2 | * File: portdrv_pci.c |
3 | * Purpose: PCI Express Port Bus Driver | 3 | * Purpose: PCI Express Port Bus Driver |
4 | * Author: Tom Nguyen <tom.l.nguyen@intel.com> | ||
5 | * Version: v1.0 | ||
4 | * | 6 | * |
5 | * Copyright (C) 2004 Intel | 7 | * Copyright (C) 2004 Intel |
6 | * Copyright (C) Tom Long Nguyen (tom.l.nguyen@intel.com) | 8 | * Copyright (C) Tom Long Nguyen (tom.l.nguyen@intel.com) |
7 | */ | 9 | */ |
8 | 10 | ||
9 | #include <linux/module.h> | ||
10 | #include <linux/pci.h> | 11 | #include <linux/pci.h> |
11 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
12 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
@@ -21,16 +22,6 @@ | |||
21 | #include "portdrv.h" | 22 | #include "portdrv.h" |
22 | #include "aer/aerdrv.h" | 23 | #include "aer/aerdrv.h" |
23 | 24 | ||
24 | /* | ||
25 | * Version Information | ||
26 | */ | ||
27 | #define DRIVER_VERSION "v1.0" | ||
28 | #define DRIVER_AUTHOR "tom.l.nguyen@intel.com" | ||
29 | #define DRIVER_DESC "PCIe Port Bus Driver" | ||
30 | MODULE_AUTHOR(DRIVER_AUTHOR); | ||
31 | MODULE_DESCRIPTION(DRIVER_DESC); | ||
32 | MODULE_LICENSE("GPL"); | ||
33 | |||
34 | /* If this switch is set, PCIe port native services should not be enabled. */ | 25 | /* If this switch is set, PCIe port native services should not be enabled. */ |
35 | bool pcie_ports_disabled; | 26 | bool pcie_ports_disabled; |
36 | 27 | ||
@@ -341,7 +332,6 @@ static const struct pci_device_id port_pci_ids[] = { { | |||
341 | PCI_DEVICE_CLASS(((PCI_CLASS_BRIDGE_PCI << 8) | 0x00), ~0), | 332 | PCI_DEVICE_CLASS(((PCI_CLASS_BRIDGE_PCI << 8) | 0x00), ~0), |
342 | }, { /* end: all zeroes */ } | 333 | }, { /* end: all zeroes */ } |
343 | }; | 334 | }; |
344 | MODULE_DEVICE_TABLE(pci, port_pci_ids); | ||
345 | 335 | ||
346 | static const struct pci_error_handlers pcie_portdrv_err_handler = { | 336 | static const struct pci_error_handlers pcie_portdrv_err_handler = { |
347 | .error_detected = pcie_portdrv_error_detected, | 337 | .error_detected = pcie_portdrv_error_detected, |
@@ -406,5 +396,4 @@ static int __init pcie_portdrv_init(void) | |||
406 | out: | 396 | out: |
407 | return retval; | 397 | return retval; |
408 | } | 398 | } |
409 | 399 | device_initcall(pcie_portdrv_init); | |
410 | module_init(pcie_portdrv_init); | ||