Re: [PATCH 2.6.9-rc2-mm4 zr36120.c][5/8] Convert pci_find_device to pci_dev_present

From: Hanna Linder
Date: Thu Sep 30 2004 - 17:36:37 EST


--On Thursday, September 30, 2004 10:27:48 AM +0200 Gerd Knorr <kraxel@xxxxxxxxxxx> wrote:

>> The whole driver is CONFIG_BROKEN anyway... I only verified my changes
>> didn't add new compiler errors. What part should I remove? Just this check?
>
> pci/quirks.c does these checks and sets the flags.
> Replacing with a check for "pci_pci_problems & PCIPCI_TRITON" should do.
>
> bttv does simliar things in bttv_check_chipset() (bttv-cards.c),
> you might want to have a look there ...
>
> Gerd

Hi,

Thanks a lot for your help. Is this what you were thinking?
Ive compile tested it.

Hanna Linder
IBM Linux Technology Center

Signed-off-by: Hanna Linder <hannal@xxxxxxxxxx>

---
diff -Nrup linux-2.6.9-rc2-mm4cln/drivers/media/video/zr36120.c linux-2.6.9-rc2-mm4patch/drivers/media/video/zr36120.c
--- linux-2.6.9-rc2-mm4cln/drivers/media/video/zr36120.c 2004-09-28 14:58:36.000000000 -0700
+++ linux-2.6.9-rc2-mm4patch/drivers/media/video/zr36120.c 2004-09-30 15:17:56.201723784 -0700
@@ -145,14 +145,11 @@ static struct { const char name[8]; uint
static
void __init handle_chipset(void)
{
- struct pci_dev *dev = NULL;
-
/* Just in case some nut set this to something dangerous */
if (triton1)
triton1 = ZORAN_VDC_TRICOM;

- while ((dev = pci_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82437, dev)))
- {
+ if (pci_pci_problems & PCIPCI_TRITON) {
printk(KERN_INFO "zoran: Host bridge 82437FX Triton PIIX\n");
triton1 = ZORAN_VDC_TRICOM;
}


-
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/