Messages in this thread | | | Date | Mon, 3 Feb 2003 10:27:45 +0100 (CET) | From | Jaroslav Kysela <> | Subject | Re: [PATCH][RFC] Various Fixes and Improved Error Checking (3/4) |
| |
On Sun, 2 Feb 2003, Adam Belay wrote:
> - for (tmp = 0; tmp < 8 && pnp_port_valid(dev, tmp); tmp++) > - isapnp_write_word(ISAPNP_CFG_PORT+(tmp<<1), pnp_port_start(dev, tmp)); > - for (tmp = 0; tmp < 2 && pnp_irq_valid(dev, tmp); tmp++) { > - int irq = pnp_irq(dev, tmp); > + for (tmp = 0; tmp < 8 && res->port_resource[tmp].flags & IORESOURCE_IO; tmp++) > + isapnp_write_word(ISAPNP_CFG_PORT+(tmp<<1), res->port_resource[tmp].start); > + for (tmp = 0; tmp < 2 && res->irq_resource[tmp].flags & IORESOURCE_IRQ; tmp++) { > + int irq = res->irq_resource[tmp].start;
Why you remove pnp_*_valid() checks? They are more robust. There is also check for UNSET flag.
Jaroslav
----- Jaroslav Kysela <perex@suse.cz> Linux Kernel Sound Maintainer ALSA Project, SuSE Labs
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |