summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2009-12-13 01:03:12 -0700
committerGrant Likely <grant.likely@secretlab.ca>2009-12-13 01:03:12 -0700
commit965346e3b99e2c5f51bd1325ddd0257227000355 (patch)
treec701088615222dc3192b04de6b523255a4bcd994
parent35c9049b27040d09461bc90928ad770be7ddf661 (diff)
downloadop-kernel-dev-965346e3b99e2c5f51bd1325ddd0257227000355.zip
op-kernel-dev-965346e3b99e2c5f51bd1325ddd0257227000355.tar.gz
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>
-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 e334747..1893f1e 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)
{
}
-static int __init spi_imx_probe(struct platform_device *pdev)
+static int __devinit spi_imx_probe(struct platform_device *pdev)
{
struct spi_imx_master *mxc_platform_info;
struct spi_master *master;
@@ -634,7 +634,7 @@ out_master_put:
return ret;
}
-static int __exit spi_imx_remove(struct platform_device *pdev)
+static int __devexit spi_imx_remove(struct platform_device *pdev)
{
struct spi_master *master = platform_get_drvdata(pdev);
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -668,7 +668,7 @@ static struct platform_driver spi_imx_driver = {
.owner = THIS_MODULE,
},
.probe = spi_imx_probe,
- .remove = __exit_p(spi_imx_remove),
+ .remove = __devexit_p(spi_imx_remove),
};
static int __init spi_imx_init(void)
OpenPOWER on IntegriCloud