Skip to content

Commit

Permalink
spi: fix probe/remove section markings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Grant Likely committed Dec 13, 2009
1 parent 35c9049 commit 965346e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/spi/spi_imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -634,7 +634,7 @@ static int __init spi_imx_probe(struct platform_device *pdev)
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);
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 965346e

Please sign in to comment.