diff options
author | Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | 2009-03-25 05:17:42 -0400 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2009-04-08 14:06:22 -0400 |
commit | b513b6cc0fcbb0ef733eec487618da7ea2d7cc61 (patch) | |
tree | 15f51b5fdbc113b93546d68c4aeb7e170dc9056b /drivers/mmc/host/imxmmc.c | |
parent | 3e44ddd44ea59354221b811605745ec453130c06 (diff) |
imxmmc: init-exit rework
Add __init __exit for appropriate probe and remove functions.
Conver to platform_driver_probe()
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc/host/imxmmc.c')
-rw-r--r-- | drivers/mmc/host/imxmmc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/mmc/host/imxmmc.c b/drivers/mmc/host/imxmmc.c index eb29b1d933a..0fa7af38919 100644 --- a/drivers/mmc/host/imxmmc.c +++ b/drivers/mmc/host/imxmmc.c | |||
@@ -938,7 +938,7 @@ static void imxmci_check_status(unsigned long data) | |||
938 | mod_timer(&host->timer, jiffies + (HZ>>1)); | 938 | mod_timer(&host->timer, jiffies + (HZ>>1)); |
939 | } | 939 | } |
940 | 940 | ||
941 | static int imxmci_probe(struct platform_device *pdev) | 941 | static int __init imxmci_probe(struct platform_device *pdev) |
942 | { | 942 | { |
943 | struct mmc_host *mmc; | 943 | struct mmc_host *mmc; |
944 | struct imxmci_host *host = NULL; | 944 | struct imxmci_host *host = NULL; |
@@ -1079,7 +1079,7 @@ out: | |||
1079 | return ret; | 1079 | return ret; |
1080 | } | 1080 | } |
1081 | 1081 | ||
1082 | static int imxmci_remove(struct platform_device *pdev) | 1082 | static int __exit imxmci_remove(struct platform_device *pdev) |
1083 | { | 1083 | { |
1084 | struct mmc_host *mmc = platform_get_drvdata(pdev); | 1084 | struct mmc_host *mmc = platform_get_drvdata(pdev); |
1085 | 1085 | ||
@@ -1145,8 +1145,7 @@ static int imxmci_resume(struct platform_device *dev) | |||
1145 | #endif /* CONFIG_PM */ | 1145 | #endif /* CONFIG_PM */ |
1146 | 1146 | ||
1147 | static struct platform_driver imxmci_driver = { | 1147 | static struct platform_driver imxmci_driver = { |
1148 | .probe = imxmci_probe, | 1148 | .remove = __exit_p(imxmci_remove), |
1149 | .remove = imxmci_remove, | ||
1150 | .suspend = imxmci_suspend, | 1149 | .suspend = imxmci_suspend, |
1151 | .resume = imxmci_resume, | 1150 | .resume = imxmci_resume, |
1152 | .driver = { | 1151 | .driver = { |
@@ -1157,7 +1156,7 @@ static struct platform_driver imxmci_driver = { | |||
1157 | 1156 | ||
1158 | static int __init imxmci_init(void) | 1157 | static int __init imxmci_init(void) |
1159 | { | 1158 | { |
1160 | return platform_driver_register(&imxmci_driver); | 1159 | return platform_driver_probe(&imxmci_driver, imxmci_probe); |
1161 | } | 1160 | } |
1162 | 1161 | ||
1163 | static void __exit imxmci_exit(void) | 1162 | static void __exit imxmci_exit(void) |