mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shubhrajyoti D <shubhrajyoti@ti.com>
To: <spi-devel-general@lists.sourceforge.net>
Cc: <linux-omap@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Felipe Balbi <balbi@ti.com>, Shubhrajyoti D <shubhrajyoti@ti.com>
Subject: [PATCH 1/3] spi: omap2-mcspi: make it behave as a module
Date: Tue, 20 Mar 2012 15:59:47 +0530	[thread overview]
Message-ID: <1332239389-1897-2-git-send-email-shubhrajyoti@ti.com> (raw)
In-Reply-To: <1332239389-1897-1-git-send-email-shubhrajyoti@ti.com>

From: Felipe Balbi <balbi@ti.com>

move probe away from __init section and use
platform_driver_register() instead of
platform_driver_probe().

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
---
 drivers/spi/spi-omap2-mcspi.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index 0b0dfb7..5f4419e 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -1080,7 +1080,7 @@ static int omap_mcspi_runtime_resume(struct device *dev)
 }
 
 
-static int __init omap2_mcspi_probe(struct platform_device *pdev)
+static int __devinit omap2_mcspi_probe(struct platform_device *pdev)
 {
 	struct spi_master	*master;
 	struct omap2_mcspi_platform_config *pdata = pdev->dev.platform_data;
@@ -1212,7 +1212,7 @@ free_master:
 	return status;
 }
 
-static int __exit omap2_mcspi_remove(struct platform_device *pdev)
+static int __devexit omap2_mcspi_remove(struct platform_device *pdev)
 {
 	struct spi_master	*master;
 	struct omap2_mcspi	*mcspi;
@@ -1287,13 +1287,14 @@ static struct platform_driver omap2_mcspi_driver = {
 		.owner =	THIS_MODULE,
 		.pm =		&omap2_mcspi_pm_ops
 	},
-	.remove =	__exit_p(omap2_mcspi_remove),
+	.probe =	omap2_mcspi_probe,
+	.remove =	__devexit_p(omap2_mcspi_remove),
 };
 
 
 static int __init omap2_mcspi_init(void)
 {
-	return platform_driver_probe(&omap2_mcspi_driver, omap2_mcspi_probe);
+	return platform_driver_register(&omap2_mcspi_driver);
 }
 subsys_initcall(omap2_mcspi_init);
 
-- 
1.7.1


  reply	other threads:[~2012-03-20 10:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-20 10:29 [PATCH 0/3] SPI updates Shubhrajyoti D
2012-03-20 10:29 ` Shubhrajyoti D [this message]
2012-03-20 10:29 ` [PATCH 2/3] spi: omap2-mcspi: convert to module_platform_driver Shubhrajyoti D
2012-03-20 10:29 ` [PATCH 3/3] spi: omap2-mcspi: use devm_* functions Shubhrajyoti D
2012-03-20 16:20 ` [PATCH 0/3] SPI updates Grant Likely
2012-03-20 16:42   ` Shubhrajyoti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1332239389-1897-2-git-send-email-shubhrajyoti@ti.com \
    --to=shubhrajyoti@ti.com \
    --cc=balbi@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=spi-devel-general@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®