aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2023-04-20 10:51:45 +0200
committerÁlvaro Fernández Rojas <noltari@gmail.com>2023-04-23 12:19:02 +0200
commitb98955c623119eeafef48064b2cce92921a7f8db (patch)
tree11e8767fd1d79965d2b81918e9c7ef173e51ad3a /target
parent77d85a1bd32454acd216ef2408fd99903b7b7d8f (diff)
downloadupstream-b98955c623119eeafef48064b2cce92921a7f8db.tar.gz
upstream-b98955c623119eeafef48064b2cce92921a7f8db.tar.bz2
upstream-b98955c623119eeafef48064b2cce92921a7f8db.zip
bmips: pci: use standard module functions
late_initcall_sync() is no longer needed so standard module functions can be used on all bmips PCI/PCIe drivers. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target')
-rw-r--r--target/linux/bmips/files/drivers/pci/controller/pci-bcm6348.c15
-rw-r--r--target/linux/bmips/files/drivers/pci/controller/pcie-bcm6318.c15
-rw-r--r--target/linux/bmips/files/drivers/pci/controller/pcie-bcm6328.c15
3 files changed, 21 insertions, 24 deletions
diff --git a/target/linux/bmips/files/drivers/pci/controller/pci-bcm6348.c b/target/linux/bmips/files/drivers/pci/controller/pci-bcm6348.c
index 39050b3de4..bf6775c947 100644
--- a/target/linux/bmips/files/drivers/pci/controller/pci-bcm6348.c
+++ b/target/linux/bmips/files/drivers/pci/controller/pci-bcm6348.c
@@ -13,6 +13,7 @@
#include <linux/kernel.h>
#include <linux/memblock.h>
#include <linux/mm.h>
+#include <linux/module.h>
#include <linux/of_address.h>
#include <linux/of_gpio.h>
#include <linux/of_irq.h>
@@ -797,6 +798,7 @@ static const struct of_device_id bcm6348_pci_of_match[] = {
{ .compatible = "brcm,bcm6348-pci", },
{ /* sentinel */ }
};
+MODULE_DEVICE_TABLE(of, bcm6348_pci_of_match);
static struct platform_driver bcm6348_pci_driver = {
.probe = bcm6348_pci_probe,
@@ -805,12 +807,9 @@ static struct platform_driver bcm6348_pci_driver = {
.of_match_table = bcm6348_pci_of_match,
},
};
+module_platform_driver(bcm6348_pci_driver);
-int __init bcm6348_pci_init(void)
-{
- int ret = platform_driver_register(&bcm6348_pci_driver);
- if (ret)
- pr_err("pci-bcm6348: Error registering platform driver!\n");
- return ret;
-}
-late_initcall_sync(bcm6348_pci_init);
+MODULE_AUTHOR("Álvaro Fernández Rojas <noltari@gmail.com>");
+MODULE_DESCRIPTION("BCM6348 PCI Controller Driver");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:bcm6348-pci");
diff --git a/target/linux/bmips/files/drivers/pci/controller/pcie-bcm6318.c b/target/linux/bmips/files/drivers/pci/controller/pcie-bcm6318.c
index d73bf850fb..2a8fdece09 100644
--- a/target/linux/bmips/files/drivers/pci/controller/pcie-bcm6318.c
+++ b/target/linux/bmips/files/drivers/pci/controller/pcie-bcm6318.c
@@ -12,6 +12,7 @@
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/mm.h>
+#include <linux/module.h>
#include <linux/of_gpio.h>
#include <linux/of_irq.h>
#include <linux/of_pci.h>
@@ -385,6 +386,7 @@ static const struct of_device_id bcm6318_pcie_of_match[] = {
{ .compatible = "brcm,bcm6318-pcie", },
{ /* sentinel */ }
};
+MODULE_DEVICE_TABLE(of, bcm6318_pcie_of_match);
static struct platform_driver bcm6318_pcie_driver = {
.probe = bcm6318_pcie_probe,
@@ -393,12 +395,9 @@ static struct platform_driver bcm6318_pcie_driver = {
.of_match_table = bcm6318_pcie_of_match,
},
};
+module_platform_driver(bcm6318_pcie_driver);
-int __init bcm6318_pcie_init(void)
-{
- int ret = platform_driver_register(&bcm6318_pcie_driver);
- if (ret)
- pr_err("pci-bcm6318: Error registering platform driver!\n");
- return ret;
-}
-late_initcall_sync(bcm6318_pcie_init);
+MODULE_AUTHOR("Álvaro Fernández Rojas <noltari@gmail.com>");
+MODULE_DESCRIPTION("BCM6318 PCIe Controller Driver");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:bcm6318-pcie");
diff --git a/target/linux/bmips/files/drivers/pci/controller/pcie-bcm6328.c b/target/linux/bmips/files/drivers/pci/controller/pcie-bcm6328.c
index f2f74fd5e6..e0950ba439 100644
--- a/target/linux/bmips/files/drivers/pci/controller/pcie-bcm6328.c
+++ b/target/linux/bmips/files/drivers/pci/controller/pcie-bcm6328.c
@@ -13,6 +13,7 @@
#include <linux/kernel.h>
#include <linux/mfd/syscon.h>
#include <linux/mm.h>
+#include <linux/module.h>
#include <linux/of_gpio.h>
#include <linux/of_irq.h>
#include <linux/of_pci.h>
@@ -395,6 +396,7 @@ static const struct of_device_id bcm6328_pcie_of_match[] = {
{ .compatible = "brcm,bcm6328-pcie", },
{ /* sentinel */ }
};
+MODULE_DEVICE_TABLE(of, bcm6328_pcie_of_match);
static struct platform_driver bcm6328_pcie_driver = {
.probe = bcm6328_pcie_probe,
@@ -403,12 +405,9 @@ static struct platform_driver bcm6328_pcie_driver = {
.of_match_table = bcm6328_pcie_of_match,
},
};
+module_platform_driver(bcm6328_pcie_driver);
-int __init bcm6328_pcie_init(void)
-{
- int ret = platform_driver_register(&bcm6328_pcie_driver);
- if (ret)
- pr_err("pci-bcm6328: Error registering platform driver!\n");
- return ret;
-}
-late_initcall_sync(bcm6328_pcie_init);
+MODULE_AUTHOR("Álvaro Fernández Rojas <noltari@gmail.com>");
+MODULE_DESCRIPTION("BCM6328 PCIe Controller Driver");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:bcm6328-pcie");