diff options
author | Felipe Balbi <balbi@ti.com> | 2012-03-14 05:18:30 -0400 |
---|---|---|
committer | Shubhrajyoti D <shubhrajyoti@ti.com> | 2012-03-19 08:37:38 -0400 |
commit | 7d6b6d83139d0eab087645edc8c3f6b4b3cef34d (patch) | |
tree | 5b08b6e2461db5232a63e2d119881e933ff6371b /drivers/spi/spi-omap2-mcspi.c | |
parent | c16fa4f2ad19908a47c63d8fa436a1178438c7e7 (diff) |
spi: omap2-mcspi: make it behave as a module
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>
Diffstat (limited to 'drivers/spi/spi-omap2-mcspi.c')
-rw-r--r-- | 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 0b0dfb71c640..5f4419e8786f 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) | |||
1080 | } | 1080 | } |
1081 | 1081 | ||
1082 | 1082 | ||
1083 | static int __init omap2_mcspi_probe(struct platform_device *pdev) | 1083 | static int __devinit omap2_mcspi_probe(struct platform_device *pdev) |
1084 | { | 1084 | { |
1085 | struct spi_master *master; | 1085 | struct spi_master *master; |
1086 | struct omap2_mcspi_platform_config *pdata = pdev->dev.platform_data; | 1086 | struct omap2_mcspi_platform_config *pdata = pdev->dev.platform_data; |
@@ -1212,7 +1212,7 @@ free_master: | |||
1212 | return status; | 1212 | return status; |
1213 | } | 1213 | } |
1214 | 1214 | ||
1215 | static int __exit omap2_mcspi_remove(struct platform_device *pdev) | 1215 | static int __devexit omap2_mcspi_remove(struct platform_device *pdev) |
1216 | { | 1216 | { |
1217 | struct spi_master *master; | 1217 | struct spi_master *master; |
1218 | struct omap2_mcspi *mcspi; | 1218 | struct omap2_mcspi *mcspi; |
@@ -1287,13 +1287,14 @@ static struct platform_driver omap2_mcspi_driver = { | |||
1287 | .owner = THIS_MODULE, | 1287 | .owner = THIS_MODULE, |
1288 | .pm = &omap2_mcspi_pm_ops | 1288 | .pm = &omap2_mcspi_pm_ops |
1289 | }, | 1289 | }, |
1290 | .remove = __exit_p(omap2_mcspi_remove), | 1290 | .probe = omap2_mcspi_probe, |
1291 | .remove = __devexit_p(omap2_mcspi_remove), | ||
1291 | }; | 1292 | }; |
1292 | 1293 | ||
1293 | 1294 | ||
1294 | static int __init omap2_mcspi_init(void) | 1295 | static int __init omap2_mcspi_init(void) |
1295 | { | 1296 | { |
1296 | return platform_driver_probe(&omap2_mcspi_driver, omap2_mcspi_probe); | 1297 | return platform_driver_register(&omap2_mcspi_driver); |
1297 | } | 1298 | } |
1298 | subsys_initcall(omap2_mcspi_init); | 1299 | subsys_initcall(omap2_mcspi_init); |
1299 | 1300 | ||