diff options
author | Venkatraman S <svenkatr@ti.com> | 2012-05-08 07:35:34 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-05-17 08:26:15 -0400 |
commit | b6e0703bbf0121cd6440277a0604d860f5734b2c (patch) | |
tree | 8979cf5f0e0c1b9670eb1d7d9960072c32364ef6 /drivers/mmc/host/omap.c | |
parent | b01a4f1ce2cde9acd97ce5c06e35bc9c1eacded7 (diff) |
mmc: omap: make it behave well as a module
Use proper __devinit and __devexit annotation for driver functions.
Instantiate the probe function for driver_ops instead of a probe in
the register function.
Signed-off-by: Venkatraman S <svenkatr@ti.com>
Acked-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/omap.c')
-rw-r--r-- | drivers/mmc/host/omap.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 2d7628eee3d3..0056bd8acc83 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c | |||
@@ -1395,7 +1395,7 @@ static void mmc_omap_remove_slot(struct mmc_omap_slot *slot) | |||
1395 | mmc_free_host(mmc); | 1395 | mmc_free_host(mmc); |
1396 | } | 1396 | } |
1397 | 1397 | ||
1398 | static int __init mmc_omap_probe(struct platform_device *pdev) | 1398 | static int __devinit mmc_omap_probe(struct platform_device *pdev) |
1399 | { | 1399 | { |
1400 | struct omap_mmc_platform_data *pdata = pdev->dev.platform_data; | 1400 | struct omap_mmc_platform_data *pdata = pdev->dev.platform_data; |
1401 | struct mmc_omap_host *host = NULL; | 1401 | struct mmc_omap_host *host = NULL; |
@@ -1522,7 +1522,7 @@ err_free_mem_region: | |||
1522 | return ret; | 1522 | return ret; |
1523 | } | 1523 | } |
1524 | 1524 | ||
1525 | static int mmc_omap_remove(struct platform_device *pdev) | 1525 | static int __devexit mmc_omap_remove(struct platform_device *pdev) |
1526 | { | 1526 | { |
1527 | struct mmc_omap_host *host = platform_get_drvdata(pdev); | 1527 | struct mmc_omap_host *host = platform_get_drvdata(pdev); |
1528 | int i; | 1528 | int i; |
@@ -1604,7 +1604,8 @@ static int mmc_omap_resume(struct platform_device *pdev) | |||
1604 | #endif | 1604 | #endif |
1605 | 1605 | ||
1606 | static struct platform_driver mmc_omap_driver = { | 1606 | static struct platform_driver mmc_omap_driver = { |
1607 | .remove = mmc_omap_remove, | 1607 | .probe = mmc_omap_probe, |
1608 | .remove = __devexit_p(mmc_omap_remove), | ||
1608 | .suspend = mmc_omap_suspend, | 1609 | .suspend = mmc_omap_suspend, |
1609 | .resume = mmc_omap_resume, | 1610 | .resume = mmc_omap_resume, |
1610 | .driver = { | 1611 | .driver = { |
@@ -1615,7 +1616,7 @@ static struct platform_driver mmc_omap_driver = { | |||
1615 | 1616 | ||
1616 | static int __init mmc_omap_init(void) | 1617 | static int __init mmc_omap_init(void) |
1617 | { | 1618 | { |
1618 | return platform_driver_probe(&mmc_omap_driver, mmc_omap_probe); | 1619 | return platform_driver_register(&mmc_omap_driver); |
1619 | } | 1620 | } |
1620 | 1621 | ||
1621 | static void __exit mmc_omap_exit(void) | 1622 | static void __exit mmc_omap_exit(void) |