Skip to content

Commit

Permalink
atmel/spi: fix missing probe
Browse files Browse the repository at this point in the history
Commit 940ab88 "drivercore: Add helper macro for platform_driver boilerplate"
converted this driver to use module_platform_driver, but due to the use
of platform_driver_probe(), this resulted in the call to atmel_spi_probe being
lost. Place the call to this function into the driver structure.

fix section missmatch

atmel_spi_probe is marked __init where it's supposed to be __devinit
atmel_spi_remove is marked __exit where it's supposed to be __devexit

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
  • Loading branch information
plagnioj committed Nov 9, 2011
1 parent b2eb530 commit 1cb201a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/spi/spi-atmel.c
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ static void atmel_spi_cleanup(struct spi_device *spi)

/*-------------------------------------------------------------------------*/

static int __init atmel_spi_probe(struct platform_device *pdev)
static int __devinit atmel_spi_probe(struct platform_device *pdev)
{
struct resource *regs;
int irq;
Expand Down Expand Up @@ -1003,7 +1003,7 @@ static int __init atmel_spi_probe(struct platform_device *pdev)
return ret;
}

static int __exit atmel_spi_remove(struct platform_device *pdev)
static int __devexit atmel_spi_remove(struct platform_device *pdev)
{
struct spi_master *master = platform_get_drvdata(pdev);
struct atmel_spi *as = spi_master_get_devdata(master);
Expand Down Expand Up @@ -1072,6 +1072,7 @@ static struct platform_driver atmel_spi_driver = {
},
.suspend = atmel_spi_suspend,
.resume = atmel_spi_resume,
.probe = atmel_spi_probe,
.remove = __exit_p(atmel_spi_remove),
};
module_platform_driver(atmel_spi_driver);
Expand Down

0 comments on commit 1cb201a

Please sign in to comment.