diff options
author | Martin Michlmayr <tbm@cyrius.com> | 2006-03-04 18:01:13 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-03-04 18:01:13 -0500 |
commit | b256f9df4a7da248263ed95c2517ddb714f9ca95 (patch) | |
tree | 3f9baba126313e35fec32a8ade61c08a29bab382 /drivers/mmc | |
parent | c499ec24c31edf270e777a868ffd0daddcfe7ebd (diff) |
[MMC] au1xmmc: Fix compilation error by using platform_driver
drivers/mmc/au1xmmc.c currently doesn't compile; it needs to be
converted to use platform_driver. I cannot test this change because
of lack of hardware but I followed the drivers this one is based on,
and the code is certainly not worse than before.
drivers/mmc/au1xmmc.c: At top level:
drivers/mmc/au1xmmc.c:1002: error: ‘platform_bus_type’ undeclared here (not in a function)
make[2]: *** [drivers/mmc/au1xmmc.o] Error 1
Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/au1xmmc.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/mmc/au1xmmc.c b/drivers/mmc/au1xmmc.c index 227c39a7c1b4..15e12be6bef1 100644 --- a/drivers/mmc/au1xmmc.c +++ b/drivers/mmc/au1xmmc.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #include <linux/config.h> | 37 | #include <linux/config.h> |
38 | #include <linux/module.h> | 38 | #include <linux/module.h> |
39 | #include <linux/init.h> | 39 | #include <linux/init.h> |
40 | #include <linux/device.h> | 40 | #include <linux/platform_device.h> |
41 | #include <linux/mm.h> | 41 | #include <linux/mm.h> |
42 | #include <linux/interrupt.h> | 42 | #include <linux/interrupt.h> |
43 | #include <linux/dma-mapping.h> | 43 | #include <linux/dma-mapping.h> |
@@ -887,7 +887,7 @@ struct mmc_host_ops au1xmmc_ops = { | |||
887 | .set_ios = au1xmmc_set_ios, | 887 | .set_ios = au1xmmc_set_ios, |
888 | }; | 888 | }; |
889 | 889 | ||
890 | static int au1xmmc_probe(struct device *dev) | 890 | static int __devinit au1xmmc_probe(struct platform_device *pdev) |
891 | { | 891 | { |
892 | 892 | ||
893 | int i, ret = 0; | 893 | int i, ret = 0; |
@@ -904,7 +904,7 @@ static int au1xmmc_probe(struct device *dev) | |||
904 | disable_irq(AU1100_SD_IRQ); | 904 | disable_irq(AU1100_SD_IRQ); |
905 | 905 | ||
906 | for(i = 0; i < AU1XMMC_CONTROLLER_COUNT; i++) { | 906 | for(i = 0; i < AU1XMMC_CONTROLLER_COUNT; i++) { |
907 | struct mmc_host *mmc = mmc_alloc_host(sizeof(struct au1xmmc_host), dev); | 907 | struct mmc_host *mmc = mmc_alloc_host(sizeof(struct au1xmmc_host), &pdev->dev); |
908 | struct au1xmmc_host *host = 0; | 908 | struct au1xmmc_host *host = 0; |
909 | 909 | ||
910 | if (!mmc) { | 910 | if (!mmc) { |
@@ -967,7 +967,7 @@ static int au1xmmc_probe(struct device *dev) | |||
967 | return 0; | 967 | return 0; |
968 | } | 968 | } |
969 | 969 | ||
970 | static int au1xmmc_remove(struct device *dev) | 970 | static int __devexit au1xmmc_remove(struct platform_device *pdev) |
971 | { | 971 | { |
972 | 972 | ||
973 | int i; | 973 | int i; |
@@ -997,23 +997,24 @@ static int au1xmmc_remove(struct device *dev) | |||
997 | return 0; | 997 | return 0; |
998 | } | 998 | } |
999 | 999 | ||
1000 | static struct device_driver au1xmmc_driver = { | 1000 | static struct platform_driver au1xmmc_driver = { |
1001 | .name = DRIVER_NAME, | ||
1002 | .bus = &platform_bus_type, | ||
1003 | .probe = au1xmmc_probe, | 1001 | .probe = au1xmmc_probe, |
1004 | .remove = au1xmmc_remove, | 1002 | .remove = au1xmmc_remove, |
1005 | .suspend = NULL, | 1003 | .suspend = NULL, |
1006 | .resume = NULL | 1004 | .resume = NULL, |
1005 | .driver = { | ||
1006 | .name = DRIVER_NAME, | ||
1007 | }, | ||
1007 | }; | 1008 | }; |
1008 | 1009 | ||
1009 | static int __init au1xmmc_init(void) | 1010 | static int __init au1xmmc_init(void) |
1010 | { | 1011 | { |
1011 | return driver_register(&au1xmmc_driver); | 1012 | return platform_driver_register(&au1xmmc_driver); |
1012 | } | 1013 | } |
1013 | 1014 | ||
1014 | static void __exit au1xmmc_exit(void) | 1015 | static void __exit au1xmmc_exit(void) |
1015 | { | 1016 | { |
1016 | driver_unregister(&au1xmmc_driver); | 1017 | platform_driver_unregister(&au1xmmc_driver); |
1017 | } | 1018 | } |
1018 | 1019 | ||
1019 | module_init(au1xmmc_init); | 1020 | module_init(au1xmmc_init); |