diff options
Diffstat (limited to 'drivers/pcmcia/sa1100_generic.c')
-rw-r--r-- | drivers/pcmcia/sa1100_generic.c | 38 |
1 files changed, 28 insertions, 10 deletions
diff --git a/drivers/pcmcia/sa1100_generic.c b/drivers/pcmcia/sa1100_generic.c index c5b2a44b4c37..d8da5ac844e9 100644 --- a/drivers/pcmcia/sa1100_generic.c +++ b/drivers/pcmcia/sa1100_generic.c | |||
@@ -65,7 +65,7 @@ static int (*sa11x0_pcmcia_hw_init[])(struct device *dev) = { | |||
65 | #endif | 65 | #endif |
66 | }; | 66 | }; |
67 | 67 | ||
68 | static int sa11x0_drv_pcmcia_probe(struct device *dev) | 68 | static int sa11x0_drv_pcmcia_probe(struct platform_device *dev) |
69 | { | 69 | { |
70 | int i, ret = -ENODEV; | 70 | int i, ret = -ENODEV; |
71 | 71 | ||
@@ -73,7 +73,7 @@ static int sa11x0_drv_pcmcia_probe(struct device *dev) | |||
73 | * Initialise any "on-board" PCMCIA sockets. | 73 | * Initialise any "on-board" PCMCIA sockets. |
74 | */ | 74 | */ |
75 | for (i = 0; i < ARRAY_SIZE(sa11x0_pcmcia_hw_init); i++) { | 75 | for (i = 0; i < ARRAY_SIZE(sa11x0_pcmcia_hw_init); i++) { |
76 | ret = sa11x0_pcmcia_hw_init[i](dev); | 76 | ret = sa11x0_pcmcia_hw_init[i](&dev->dev); |
77 | if (ret == 0) | 77 | if (ret == 0) |
78 | break; | 78 | break; |
79 | } | 79 | } |
@@ -81,13 +81,31 @@ static int sa11x0_drv_pcmcia_probe(struct device *dev) | |||
81 | return ret; | 81 | return ret; |
82 | } | 82 | } |
83 | 83 | ||
84 | static struct device_driver sa11x0_pcmcia_driver = { | 84 | static int sa11x0_drv_pcmcia_remove(struct platform_device *dev) |
85 | { | ||
86 | return soc_common_drv_pcmcia_remove(&dev->dev); | ||
87 | } | ||
88 | |||
89 | static int sa11x0_drv_pcmcia_suspend(struct platform_device *dev, | ||
90 | pm_message_t state) | ||
91 | { | ||
92 | return pcmcia_socket_dev_suspend(&dev->dev, state); | ||
93 | } | ||
94 | |||
95 | static int sa11x0_drv_pcmcia_resume(struct platform_device *dev) | ||
96 | { | ||
97 | return pcmcia_socket_dev_resume(&dev->dev); | ||
98 | } | ||
99 | |||
100 | static struct platform_driver sa11x0_pcmcia_driver = { | ||
101 | .driver = { | ||
102 | .name = "sa11x0-pcmcia", | ||
103 | .owner = THIS_MODULE, | ||
104 | }, | ||
85 | .probe = sa11x0_drv_pcmcia_probe, | 105 | .probe = sa11x0_drv_pcmcia_probe, |
86 | .remove = soc_common_drv_pcmcia_remove, | 106 | .remove = sa11x0_drv_pcmcia_remove, |
87 | .name = "sa11x0-pcmcia", | 107 | .suspend = sa11x0_drv_pcmcia_suspend, |
88 | .bus = &platform_bus_type, | 108 | .resume = sa11x0_drv_pcmcia_resume, |
89 | .suspend = pcmcia_socket_dev_suspend, | ||
90 | .resume = pcmcia_socket_dev_resume, | ||
91 | }; | 109 | }; |
92 | 110 | ||
93 | /* sa11x0_pcmcia_init() | 111 | /* sa11x0_pcmcia_init() |
@@ -100,7 +118,7 @@ static struct device_driver sa11x0_pcmcia_driver = { | |||
100 | */ | 118 | */ |
101 | static int __init sa11x0_pcmcia_init(void) | 119 | static int __init sa11x0_pcmcia_init(void) |
102 | { | 120 | { |
103 | return driver_register(&sa11x0_pcmcia_driver); | 121 | return platform_driver_register(&sa11x0_pcmcia_driver); |
104 | } | 122 | } |
105 | 123 | ||
106 | /* sa11x0_pcmcia_exit() | 124 | /* sa11x0_pcmcia_exit() |
@@ -110,7 +128,7 @@ static int __init sa11x0_pcmcia_init(void) | |||
110 | */ | 128 | */ |
111 | static void __exit sa11x0_pcmcia_exit(void) | 129 | static void __exit sa11x0_pcmcia_exit(void) |
112 | { | 130 | { |
113 | driver_unregister(&sa11x0_pcmcia_driver); | 131 | platform_driver_unregister(&sa11x0_pcmcia_driver); |
114 | } | 132 | } |
115 | 133 | ||
116 | MODULE_AUTHOR("John Dorsey <john+@cs.cmu.edu>"); | 134 | MODULE_AUTHOR("John Dorsey <john+@cs.cmu.edu>"); |