Re: via82xx.c vs. sonypi.c i/o region conflict on vaio

From: Takashi Iwai
Date: Thu Jul 15 2004 - 04:59:54 EST


At Wed, 14 Jul 2004 15:31:44 -0400,
Jeff Garzik wrote:
>
> Greg Ingram wrote:
> > I modified the sound driver to grab only 128 ports instead of 256 and the
> > driver works fine on this hardware. In 2.6.7, it's line 2049 or so of
> > sound/pci/via82xx.c:
> >
> > old: if ((chip->res_port = request_region(chip->port, 256, card->driver)) == NULL) {
> > new: if ((chip->res_port = request_region(chip->port, 256, card->driver)) == NULL) {
>
>
> I don't see any difference between these two lines.
>
> Regardless, I see two bugs:
>
> 1) Hardcoding 256 for resource size. Should be using pci_resource_len()
>
> 2) via82xx sound driver should be using pci_request_regions() and
> pci_release_regions(), not request_region. Doing this eliminates issue #1.

Agreed, it's much simpler.
I'll fix it (over all ALSA PCI drivers).


Takashi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/