319 |
} |
} |
320 |
} |
} |
321 |
|
|
322 |
|
/* FIXME: this function cannot be called many times. the setting is cleared at each time */ |
323 |
int pnp_manual_config_dev(struct pnp_dev *dev, struct pnp_resource_table *res, int mode) |
int pnp_manual_config_dev(struct pnp_dev *dev, struct pnp_resource_table *res, int mode) |
324 |
{ |
{ |
325 |
unsigned int idx; |
unsigned int idx; |
326 |
|
int err; |
327 |
|
|
328 |
|
/* prepare the isapnp */ |
329 |
|
err = dev->p.prepare((struct isapnp_dev *)dev); |
330 |
|
|
331 |
for (idx = 0; idx < PNP_MAX_IRQ; idx++) |
for (idx = 0; idx < PNP_MAX_IRQ; idx++) |
332 |
copy_resource(&dev->p.irq_resource[idx], &res->irq_resource[idx]); |
copy_resource(&dev->p.irq_resource[idx], &res->irq_resource[idx]); |
362 |
for (idx = 0; idx < PNP_MAX_MEM; idx++) |
for (idx = 0; idx < PNP_MAX_MEM; idx++) |
363 |
copy_resource(&tmp->mem_resource[idx], &dev->p.resource[idx+8]); |
copy_resource(&tmp->mem_resource[idx], &dev->p.resource[idx+8]); |
364 |
|
|
|
/* prepare the isapnp to get the range of resources */ |
|
|
dev->p.prepare((struct isapnp_dev *)dev); |
|
365 |
/* restore the manual configuration again */ |
/* restore the manual configuration again */ |
366 |
pnp_manual_config_dev(dev, tmp, 0); |
pnp_manual_config_dev(dev, tmp, 0); |
367 |
kfree(tmp); |
kfree(tmp); |