Skip to contentSkip to conversation

PCI: altera: Use builtin_platform_driver to simplify the code

PATCH Applied Wei Yongjun 2 participants 2 messages Sep 10, 2016 – Nov 11, 2016 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: altera: Use builtin_platform_driver to simplify the code

From: Wei Yongjun <[email protected]>

Use the builtin_platform_driver() macro to make the code simpler.

---
 drivers/pci/host/pcie-altera.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/pci/host/pcie-altera.c +1 -5
index 48f2736..ea33e8f 100644
@@ -581,8 +581,4 @@ static struct platform_driver altera_pcie_driver = {
 	},
 };
 
-static int altera_pcie_init(void)
-{
-	return platform_driver_register(&altera_pcie_driver);
-}
-device_initcall(altera_pcie_init);
+builtin_platform_driver(altera_pcie_driver);
#1 lore raw
Quoted 5 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

Use the builtin_platform_driver() macro to make the code simpler.

Applied to pci/host-altera for v4.10, thanks!

Quoted 25 lines
---
 drivers/pci/host/pcie-altera.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/pci/host/pcie-altera.c +1 -6
index 48f2736..ea33e8f 100644
@@ -581,8 +581,4 @@ static struct platform_driver altera_pcie_driver = {
 	},
 };
 
-static int altera_pcie_init(void)
-{
-	return platform_driver_register(&altera_pcie_driver);
-}
-device_initcall(altera_pcie_init);
+builtin_platform_driver(altera_pcie_driver);
 
 
 
--

To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html