public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2 1/2] pci: spear: Use platform_driver_probe instead of platform_driver_register
@ 2015-02-10 16:31 Matwey V. Kornilov
  2015-02-10 16:31 ` [PATCHv2 2/2] pci: spear: Drop __initdata from struct platform_driver spear13xx_pcie_driver Matwey V. Kornilov
  2015-02-11  3:35 ` [PATCHv2 1/2] pci: spear: Use platform_driver_probe instead of platform_driver_register Viresh Kumar
  0 siblings, 2 replies; 9+ messages in thread
From: Matwey V. Kornilov @ 2015-02-10 16:31 UTC (permalink / raw)
  To: mohit.kumar, viresh.kumar
  Cc: gregkh, bhelgaas, linux-pci, linux-kernel, Matwey V. Kornilov

Use platform_driver_probe instead of platform_driver_register
because the former allows us to use probe function placed into __init section
and the driver itself is not support hotplugging (yet?).

Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
---
Changes from v1:
 - Use platform_driver_probe instead of platform_driver_register to make linker happy.

 drivers/pci/host/pcie-spear13xx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/pci/host/pcie-spear13xx.c b/drivers/pci/host/pcie-spear13xx.c
index 866465f..51e1344 100644
--- a/drivers/pci/host/pcie-spear13xx.c
+++ b/drivers/pci/host/pcie-spear13xx.c
@@ -371,7 +371,6 @@ static const struct of_device_id spear13xx_pcie_of_match[] = {
 MODULE_DEVICE_TABLE(of, spear13xx_pcie_of_match);
 
 static struct platform_driver spear13xx_pcie_driver __initdata = {
-	.probe		= spear13xx_pcie_probe,
 	.driver = {
 		.name	= "spear-pcie",
 		.of_match_table = of_match_ptr(spear13xx_pcie_of_match),
@@ -382,7 +381,7 @@ static struct platform_driver spear13xx_pcie_driver __initdata = {
 
 static int __init spear13xx_pcie_init(void)
 {
-	return platform_driver_register(&spear13xx_pcie_driver);
+	return platform_driver_probe(&spear13xx_pcie_driver, spear13xx_pcie_probe);
 }
 module_init(spear13xx_pcie_init);
 
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-02-17  6:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-10 16:31 [PATCHv2 1/2] pci: spear: Use platform_driver_probe instead of platform_driver_register Matwey V. Kornilov
2015-02-10 16:31 ` [PATCHv2 2/2] pci: spear: Drop __initdata from struct platform_driver spear13xx_pcie_driver Matwey V. Kornilov
2015-02-11  3:35 ` [PATCHv2 1/2] pci: spear: Use platform_driver_probe instead of platform_driver_register Viresh Kumar
2015-02-11  7:52   ` Stanimir Varbanov
     [not found]     ` <CAJs94EYS003e_j0S4rzKFEL=PqCqEmT7yd0qdJdnMrziE1700Q@mail.gmail.com>
2015-02-11  9:19       ` Stanimir Varbanov
2015-02-12  9:07         ` Matwey V. Kornilov
2015-02-13  2:08           ` Stanimir Varbanov
2015-02-15 13:16             ` Matwey V. Kornilov
2015-02-17  6:17               ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox