[PATCH 3/3] spi: mpc512x_psc_spi: move probe-routine to __init

From: Wolfram Sang
Date: Thu Dec 16 2010 - 12:14:17 EST


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@xxxxxxxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/