aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2009-12-13 03:03:12 -0500
committerGrant Likely <grant.likely@secretlab.ca>2009-12-13 03:03:12 -0500
commit965346e3b99e2c5f51bd1325ddd0257227000355 (patch)
treec701088615222dc3192b04de6b523255a4bcd994 /drivers
parent35c9049b27040d09461bc90928ad770be7ddf661 (diff)
spi: fix probe/remove section markings
Probe/remove functions need to be marked as __devinit and __devexit (not __init an __exit) to prevent trying to run code that has been discarded. This patch fixes the spi_imx driver to mark probe and remove correctly. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/spi/spi_imx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c
index e334747ba2d9..1893f1e96dc4 100644
--- a/drivers/spi/spi_imx.c
+++ b/drivers/spi/spi_imx.c
@@ -484,7 +484,7 @@ static void spi_imx_cleanup(struct spi_device *spi)
484{ 484{
485} 485}
486 486
487static int __init spi_imx_probe(struct platform_device *pdev) 487static int __devinit spi_imx_probe(struct platform_device *pdev)
488{ 488{
489 struct spi_imx_master *mxc_platform_info; 489 struct spi_imx_master *mxc_platform_info;
490 struct spi_master *master; 490 struct spi_master *master;
@@ -634,7 +634,7 @@ out_master_put:
634 return ret; 634 return ret;
635} 635}
636 636
637static int __exit spi_imx_remove(struct platform_device *pdev) 637static int __devexit spi_imx_remove(struct platform_device *pdev)
638{ 638{
639 struct spi_master *master = platform_get_drvdata(pdev); 639 struct spi_master *master = platform_get_drvdata(pdev);
640 struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 640 struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -668,7 +668,7 @@ static struct platform_driver spi_imx_driver = {
668 .owner = THIS_MODULE, 668 .owner = THIS_MODULE,
669 }, 669 },
670 .probe = spi_imx_probe, 670 .probe = spi_imx_probe,
671 .remove = __exit_p(spi_imx_remove), 671 .remove = __devexit_p(spi_imx_remove),
672}; 672};
673 673
674static int __init spi_imx_init(void) 674static int __init spi_imx_init(void)