Commit a26b498c authored by David Brownell's avatar David Brownell Committed by Pierre Ossman

MMC: at91 mmc linkage updates

Linker level tweaks for the AT91 MMC driver:

  - fix a wrongly-exported symbol
  - move probe() to init section
  - move remove() to exit section

When this driver is statically linked, this patch shrinks the driver's
runtime I-space footprint by over 20% (950 bytes).
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
parent 3947a390
...@@ -768,7 +768,7 @@ static irqreturn_t at91_mmc_det_irq(int irq, void *_host) ...@@ -768,7 +768,7 @@ static irqreturn_t at91_mmc_det_irq(int irq, void *_host)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
int at91_mci_get_ro(struct mmc_host *mmc) static int at91_mci_get_ro(struct mmc_host *mmc)
{ {
int read_only = 0; int read_only = 0;
struct at91mci_host *host = mmc_priv(mmc); struct at91mci_host *host = mmc_priv(mmc);
...@@ -794,7 +794,7 @@ static const struct mmc_host_ops at91_mci_ops = { ...@@ -794,7 +794,7 @@ static const struct mmc_host_ops at91_mci_ops = {
/* /*
* Probe for the device * Probe for the device
*/ */
static int at91_mci_probe(struct platform_device *pdev) static int __init at91_mci_probe(struct platform_device *pdev)
{ {
struct mmc_host *mmc; struct mmc_host *mmc;
struct at91mci_host *host; struct at91mci_host *host;
...@@ -910,7 +910,7 @@ static int at91_mci_probe(struct platform_device *pdev) ...@@ -910,7 +910,7 @@ static int at91_mci_probe(struct platform_device *pdev)
/* /*
* Remove a device * Remove a device
*/ */
static int at91_mci_remove(struct platform_device *pdev) static int __exit at91_mci_remove(struct platform_device *pdev)
{ {
struct mmc_host *mmc = platform_get_drvdata(pdev); struct mmc_host *mmc = platform_get_drvdata(pdev);
struct at91mci_host *host; struct at91mci_host *host;
...@@ -972,8 +972,7 @@ static int at91_mci_resume(struct platform_device *pdev) ...@@ -972,8 +972,7 @@ static int at91_mci_resume(struct platform_device *pdev)
#endif #endif
static struct platform_driver at91_mci_driver = { static struct platform_driver at91_mci_driver = {
.probe = at91_mci_probe, .remove = __exit_p(at91_mci_remove),
.remove = at91_mci_remove,
.suspend = at91_mci_suspend, .suspend = at91_mci_suspend,
.resume = at91_mci_resume, .resume = at91_mci_resume,
.driver = { .driver = {
...@@ -984,7 +983,7 @@ static struct platform_driver at91_mci_driver = { ...@@ -984,7 +983,7 @@ static struct platform_driver at91_mci_driver = {
static int __init at91_mci_init(void) static int __init at91_mci_init(void)
{ {
return platform_driver_register(&at91_mci_driver); return platform_driver_probe(&at91_mci_driver, at91_mci_probe);
} }
static void __exit at91_mci_exit(void) static void __exit at91_mci_exit(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment