aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/pxa2xx_base.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia/pxa2xx_base.c')
-rw-r--r--drivers/pcmcia/pxa2xx_base.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c
index 3cb4fd21cc2f..c9c104b57c59 100644
--- a/drivers/pcmcia/pxa2xx_base.c
+++ b/drivers/pcmcia/pxa2xx_base.c
@@ -228,7 +228,7 @@ static const char *skt_names[] = {
228#define SKT_DEV_INFO_SIZE(n) \ 228#define SKT_DEV_INFO_SIZE(n) \
229 (sizeof(struct skt_dev_info) + (n)*sizeof(struct soc_pcmcia_socket)) 229 (sizeof(struct skt_dev_info) + (n)*sizeof(struct soc_pcmcia_socket))
230 230
231static int pxa2xx_drv_pcmcia_add_one(struct soc_pcmcia_socket *skt) 231int pxa2xx_drv_pcmcia_add_one(struct soc_pcmcia_socket *skt)
232{ 232{
233 skt->res_skt.start = _PCMCIA(skt->nr); 233 skt->res_skt.start = _PCMCIA(skt->nr);
234 skt->res_skt.end = _PCMCIA(skt->nr) + PCMCIASp - 1; 234 skt->res_skt.end = _PCMCIA(skt->nr) + PCMCIASp - 1;
@@ -253,9 +253,18 @@ static int pxa2xx_drv_pcmcia_add_one(struct soc_pcmcia_socket *skt)
253 return soc_pcmcia_add_one(skt); 253 return soc_pcmcia_add_one(skt);
254} 254}
255 255
256void pxa2xx_drv_pcmcia_ops(struct pcmcia_low_level *ops)
257{
258 /* Provide our PXA2xx specific timing routines. */
259 ops->set_timing = pxa2xx_pcmcia_set_timing;
260#ifdef CONFIG_CPU_FREQ
261 ops->frequency_change = pxa2xx_pcmcia_frequency_change;
262#endif
263}
264
256int __pxa2xx_drv_pcmcia_probe(struct device *dev) 265int __pxa2xx_drv_pcmcia_probe(struct device *dev)
257{ 266{
258 int i, ret; 267 int i, ret = 0;
259 struct pcmcia_low_level *ops; 268 struct pcmcia_low_level *ops;
260 struct skt_dev_info *sinfo; 269 struct skt_dev_info *sinfo;
261 struct soc_pcmcia_socket *skt; 270 struct soc_pcmcia_socket *skt;
@@ -265,11 +274,7 @@ int __pxa2xx_drv_pcmcia_probe(struct device *dev)
265 274
266 ops = (struct pcmcia_low_level *)dev->platform_data; 275 ops = (struct pcmcia_low_level *)dev->platform_data;
267 276
268 /* Provide our PXA2xx specific timing routines. */ 277 pxa2xx_drv_pcmcia_ops(ops);
269 ops->set_timing = pxa2xx_pcmcia_set_timing;
270#ifdef CONFIG_CPU_FREQ
271 ops->frequency_change = pxa2xx_pcmcia_frequency_change;
272#endif
273 278
274 sinfo = kzalloc(SKT_DEV_INFO_SIZE(ops->nr), GFP_KERNEL); 279 sinfo = kzalloc(SKT_DEV_INFO_SIZE(ops->nr), GFP_KERNEL);
275 if (!sinfo) 280 if (!sinfo)