[PATCH 2.6.9-rc2-mm4 zr36120.c][5/8] Convert pci_find_device to pci_dev_present
From: Hanna Linder (hannal_at_us.ibm.com)
Date: 09/30/04
- Previous message: Alan Cox: "Re: [PATCH 2.6.9-rc2-mm4 alim15x3.c] [3/8] Replace pci_find_device with pci_dev_present"
- Next in thread: Alan Cox: "Re: [PATCH 2.6.9-rc2-mm4 zr36120.c][5/8] Convert pci_find_device to pci_dev_present"
- Reply: Alan Cox: "Re: [PATCH 2.6.9-rc2-mm4 zr36120.c][5/8] Convert pci_find_device to pci_dev_present"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 29 Sep 2004 15:28:20 -0700 To: linux-kernel@vger.kernel.org
The dev was not used from pci_find_device so it was acceptable to replace
with pci_dev_present. There was no need for it to be in a while loop originally.
Compile tested.
Hanna Linder
IBM Linux Technology Center
Signed-off-by: Hanna Linder <hannal@us.ibm.com>
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-29 15:12:53.625518848 -0700
@@ -145,14 +145,16 @@ static struct { const char name[8]; uint
static
void __init handle_chipset(void)
{
- struct pci_dev *dev = NULL;
+ static struct pci_device_id intel_82437[] = {
+ { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82437) },
+ { },
+ };
/* 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_dev_present(intel_82437)) {
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Alan Cox: "Re: [PATCH 2.6.9-rc2-mm4 alim15x3.c] [3/8] Replace pci_find_device with pci_dev_present"
- Next in thread: Alan Cox: "Re: [PATCH 2.6.9-rc2-mm4 zr36120.c][5/8] Convert pci_find_device to pci_dev_present"
- Reply: Alan Cox: "Re: [PATCH 2.6.9-rc2-mm4 zr36120.c][5/8] Convert pci_find_device to pci_dev_present"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: Help port swsusp to ppc.
... > to the suspend image with those informations and the page copy loop ...
send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html
... (Linux-Kernel) - Re: 2.6.0-test2: cursor started to disappear
... >> Loop is not stable at all. ... Andries ... send the line
"unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html
... (Linux-Kernel) - Re: [PATCH] Driver Core update for 2.6.3-rc1
... * Copyright 2002-3 Patrick Mochel ... void class_simple_device_remove(dev_t
dev) ... send the line "unsubscribe linux-kernel" in ... More majordomo info
at http://vger.kernel.org/majordomo-info.html ... (Linux-Kernel) - Poss. bug in tulip driver since 2.4.7
... The inner for loop shown below was not ... supposed to be inside the outside
loop. ... send the line "unsubscribe linux-kernel" in ... More majordomo
info at http://vger.kernel.org/majordomo-info.html ... (Linux-Kernel) - yam driver null deref
... static int yam_close(struct net_device *dev) ... send the line "unsubscribe
linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html
... (Linux-Kernel)