From: Wolfram Sang <w.sang@pengutronix.de>
To: devicetree-discuss@ozlabs.org
Cc: linux-kernel@vger.kernel.org,
Grant Likely <grant.likely@secretlab.ca>,
Wolfram Sang <w.sang@pengutronix.de>
Subject: [PATCH 3/3] spi: mpc512x_psc_spi: move probe-routine to __init
Date: Thu, 16 Dec 2010 18:13:59 +0100 [thread overview]
Message-ID: <1292519639-21859-4-git-send-email-w.sang@pengutronix.de> (raw)
In-Reply-To: <1292519639-21859-1-git-send-email-w.sang@pengutronix.de>
Since of_probe_platform_driver(), this SoC-device can be moved from
__devinit to __init because it is not hotpluggable.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---
drivers/spi/mpc512x_psc_spi.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/spi/mpc512x_psc_spi.c b/drivers/spi/mpc512x_psc_spi.c
index 77d9e7e..c672144 100644
--- a/drivers/spi/mpc512x_psc_spi.c
+++ b/drivers/spi/mpc512x_psc_spi.c
@@ -507,7 +507,7 @@ static int __devexit mpc512x_psc_spi_do_remove(struct device *dev)
return 0;
}
-static int __devinit mpc512x_psc_spi_of_probe(struct platform_device *op,
+static int __init mpc512x_psc_spi_of_probe(struct platform_device *op,
const struct of_device_id *match)
{
const u32 *regaddr_p;
@@ -539,7 +539,7 @@ static int __devinit mpc512x_psc_spi_of_probe(struct platform_device *op,
irq_of_parse_and_map(op->dev.of_node, 0), id);
}
-static int __devexit mpc512x_psc_spi_of_remove(struct platform_device *op)
+static int __exit mpc512x_psc_spi_of_remove(struct platform_device *op)
{
return mpc512x_psc_spi_do_remove(&op->dev);
}
@@ -552,8 +552,7 @@ static struct of_device_id mpc512x_psc_spi_of_match[] = {
MODULE_DEVICE_TABLE(of, mpc512x_psc_spi_of_match);
static struct of_platform_driver mpc512x_psc_spi_of_driver = {
- .probe = mpc512x_psc_spi_of_probe,
- .remove = __devexit_p(mpc512x_psc_spi_of_remove),
+ .remove = __exit_p(mpc512x_psc_spi_of_remove),
.driver = {
.name = "mpc512x-psc-spi",
.owner = THIS_MODULE,
@@ -563,7 +562,8 @@ static struct of_platform_driver mpc512x_psc_spi_of_driver = {
static int __init mpc512x_psc_spi_init(void)
{
- return of_register_platform_driver(&mpc512x_psc_spi_of_driver);
+ return of_probe_platform_driver(&mpc512x_psc_spi_of_driver,
+ mpc512x_psc_spi_of_probe);
}
module_init(mpc512x_psc_spi_init);
--
1.7.2.3
next prev parent reply other threads:[~2010-12-16 17:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-16 17:13 [RFC 0/3] Introduce of_probe_platform_driver() Wolfram Sang
2010-12-16 17:13 ` [PATCH 1/3] of: platform: introduce of_probe_platform_driver() Wolfram Sang
2010-12-16 17:22 ` Grant Likely
2010-12-16 18:26 ` Wolfram Sang
2010-12-16 17:13 ` [PATCH 2/3] spi: mpc52xx_psc_spi: fix section mismatch warning Wolfram Sang
2010-12-16 17:23 ` Grant Likely
2010-12-16 17:13 ` Wolfram Sang [this message]
2010-12-16 17:27 ` [PATCH 3/3] spi: mpc512x_psc_spi: move probe-routine to __init Grant Likely
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=1292519639-21859-4-git-send-email-w.sang@pengutronix.de \
--to=w.sang@pengutronix.de \
--cc=devicetree-discuss@ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=linux-kernel@vger.kernel.org \
/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®