diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-10-25 21:49:27 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-12-04 20:12:02 -0500 |
commit | af2b3b503ad1b071b66e1531caae252b4b95c847 (patch) | |
tree | 600785af3af4a79978f688fa35e19ab900db264b /drivers/pcmcia | |
parent | a9606fd39083478bef313c0e3b77bc065e39e36e (diff) |
[PATCH] pcmcia: conf.ConfigBase and conf.Present consolidation
struct pcmcia_device *p_dev->conf.ConfigBase and .Present are set in almost
all PCMICA driver right at the beginning, using the same calls but slightly
different implementations. Unfiy this in the PCMCIA core.
Includes a small bugfix ("drivers/net/pcmcia/xirc2ps_cs.c: remove unused
label") from and Signed-off-by Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r-- | drivers/pcmcia/ds.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 6572b3850e55..5b302e822ef5 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
@@ -313,6 +313,7 @@ static int pcmcia_device_probe(struct device * dev) | |||
313 | struct pcmcia_driver *p_drv; | 313 | struct pcmcia_driver *p_drv; |
314 | struct pcmcia_device_id *did; | 314 | struct pcmcia_device_id *did; |
315 | struct pcmcia_socket *s; | 315 | struct pcmcia_socket *s; |
316 | cistpl_config_t cis_config; | ||
316 | int ret = 0; | 317 | int ret = 0; |
317 | 318 | ||
318 | dev = get_device(dev); | 319 | dev = get_device(dev); |
@@ -329,6 +330,18 @@ static int pcmcia_device_probe(struct device * dev) | |||
329 | goto put_dev; | 330 | goto put_dev; |
330 | } | 331 | } |
331 | 332 | ||
333 | /* set up some more device information */ | ||
334 | ret = pccard_read_tuple(p_dev->socket, p_dev->func, CISTPL_CONFIG, | ||
335 | &cis_config); | ||
336 | if (!ret) { | ||
337 | p_dev->conf.ConfigBase = cis_config.base; | ||
338 | p_dev->conf.Present = cis_config.rmask[0]; | ||
339 | } else { | ||
340 | printk(KERN_INFO "pcmcia: could not parse base and rmask0 of CIS\n"); | ||
341 | p_dev->conf.ConfigBase = 0; | ||
342 | p_dev->conf.Present = 0; | ||
343 | } | ||
344 | |||
332 | ret = p_drv->probe(p_dev); | 345 | ret = p_drv->probe(p_dev); |
333 | if (ret) | 346 | if (ret) |
334 | goto put_module; | 347 | goto put_module; |