linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: keystone: fix incorrect annotations on probe and remove
@ 2015-01-08 22:17 Dmitry Torokhov
  2015-01-23 21:34 ` Bjorn Helgaas
  2015-01-23 23:04 ` Bjorn Helgaas
  0 siblings, 2 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2015-01-08 22:17 UTC (permalink / raw)
  To: Murali Karicheri
  Cc: Bjorn Helgaas, Santosh Shilimkar, Arnd Bergmann, linux-pci,
	linux-arm-kernel, linux-kernel

Even though platform bus is not hot-pluggable, devices on it can be unbound
from the driver and bound back to it via sysfs, so we should not be using
__init annotations on probe() and __exit annotations on remove() methods.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---

Not tested, found by casual code inspection.

 drivers/pci/host/pci-keystone.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/host/pci-keystone.c b/drivers/pci/host/pci-keystone.c
index 1b893bc..7b84e1d 100644
--- a/drivers/pci/host/pci-keystone.c
+++ b/drivers/pci/host/pci-keystone.c
@@ -332,7 +332,7 @@ static const struct of_device_id ks_pcie_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, ks_pcie_of_match);
 
-static int __exit ks_pcie_remove(struct platform_device *pdev)
+static int ks_pcie_remove(struct platform_device *pdev)
 {
 	struct keystone_pcie *ks_pcie = platform_get_drvdata(pdev);
 
@@ -341,7 +341,7 @@ static int __exit ks_pcie_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static int __init ks_pcie_probe(struct platform_device *pdev)
+static int ks_pcie_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct keystone_pcie *ks_pcie;
@@ -398,9 +398,9 @@ fail_clk:
 	return ret;
 }
 
-static struct platform_driver ks_pcie_driver __refdata = {
+static struct platform_driver ks_pcie_driver = {
 	.probe  = ks_pcie_probe,
-	.remove = __exit_p(ks_pcie_remove),
+	.remove = ks_pcie_remove,
 	.driver = {
 		.name	= "keystone-pcie",
 		.owner	= THIS_MODULE,
-- 
2.2.0.rc0.207.ga3a616c


-- 
Dmitry

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

end of thread, other threads:[~2015-01-23 23:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-08 22:17 [PATCH] PCI: keystone: fix incorrect annotations on probe and remove Dmitry Torokhov
2015-01-23 21:34 ` Bjorn Helgaas
2015-01-23 21:47   ` Dmitry Torokhov
2015-01-23 22:03     ` Dmitry Torokhov
2015-01-23 23:04 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).