Commit b513b6cc authored by Paulius Zaleckas's avatar Paulius Zaleckas Committed by Pierre Ossman

imxmmc: init-exit rework

Add __init __exit for appropriate probe and remove functions.
Conver to platform_driver_probe()
Signed-off-by: default avatarPaulius Zaleckas <paulius.zaleckas@teltonika.lt>
Acked-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
parent 3e44ddd4
...@@ -938,7 +938,7 @@ static void imxmci_check_status(unsigned long data) ...@@ -938,7 +938,7 @@ static void imxmci_check_status(unsigned long data)
mod_timer(&host->timer, jiffies + (HZ>>1)); mod_timer(&host->timer, jiffies + (HZ>>1));
} }
static int imxmci_probe(struct platform_device *pdev) static int __init imxmci_probe(struct platform_device *pdev)
{ {
struct mmc_host *mmc; struct mmc_host *mmc;
struct imxmci_host *host = NULL; struct imxmci_host *host = NULL;
...@@ -1079,7 +1079,7 @@ static int imxmci_probe(struct platform_device *pdev) ...@@ -1079,7 +1079,7 @@ static int imxmci_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int imxmci_remove(struct platform_device *pdev) static int __exit imxmci_remove(struct platform_device *pdev)
{ {
struct mmc_host *mmc = platform_get_drvdata(pdev); struct mmc_host *mmc = platform_get_drvdata(pdev);
...@@ -1145,8 +1145,7 @@ static int imxmci_resume(struct platform_device *dev) ...@@ -1145,8 +1145,7 @@ static int imxmci_resume(struct platform_device *dev)
#endif /* CONFIG_PM */ #endif /* CONFIG_PM */
static struct platform_driver imxmci_driver = { static struct platform_driver imxmci_driver = {
.probe = imxmci_probe, .remove = __exit_p(imxmci_remove),
.remove = imxmci_remove,
.suspend = imxmci_suspend, .suspend = imxmci_suspend,
.resume = imxmci_resume, .resume = imxmci_resume,
.driver = { .driver = {
...@@ -1157,7 +1156,7 @@ static struct platform_driver imxmci_driver = { ...@@ -1157,7 +1156,7 @@ static struct platform_driver imxmci_driver = {
static int __init imxmci_init(void) static int __init imxmci_init(void)
{ {
return platform_driver_register(&imxmci_driver); return platform_driver_probe(&imxmci_driver, imxmci_probe);
} }
static void __exit imxmci_exit(void) static void __exit imxmci_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