piix: Use refcounted interface when searching for a 450NX
PATCH 1/1 piix: Use refcounted interface when searching for a 450NX
Simple conversion
drivers/ide/pci/piix.c +1 -1
@@ -602,7 +602,7 @@struct pci_dev *pdev =NULL ;u16 cfg;u8 rev; -while ((pdev=pci_find_device (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_82454NX , pdev))!=NULL ) +while ((pdev=pci_get_device (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_82454NX , pdev))!=NULL ) {/* Look for 450NX PXB. Check for problem configurations A PCI quirk checks bit 6 already */
Hello.
Quoted 8 lines · Alan Cox
Simple conversion
Signed-off-by Alan Cox <[email protected]>diff -u --new-file --recursive --exclude-from
/usr/src/excludelinux.vanilla-2.6.18-rc6-mm1/drivers/ide/pci/piix.clinux-2.6.18-rc6-mm1/drivers/ide/pci/piix.c
drivers/ide/pci/piix.c line 608
Quoted 8 lines
drivers/ide/pci/piix.c +1
-1@@ -602,7 +602,7 @@struct pci_dev *pdev =NULL ;u16 cfg;u8 rev; -while ((pdev=pci_find_device (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_82454NX , pdev))!=NULL ) +while ((pdev=pci_get_device (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_82454NX , pdev))!=NULL ) {/* Look for 450NX PXB. Check for problem configurations A PCI quirk checks bit 6 already */
Shouldn't pci_put_dev() be called after the bridge device no longer needed?
I assume it's not needed anymore after this function is finished...
WBR, Sergei
Ar Gwe, 2006-09-15 am 18:14 +0400, ysgrifennodd Sergei Shtylyov:
Quoted 8 lines
drivers/ide/pci/piix.c line 608
Quoted 5 lines
drivers/ide/pci/piix.c +1
-1-while ((pdev=pci_find_device (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_82454NX , pdev))!=NULL ) +while ((pdev=pci_get_device (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_82454NX , pdev))!=NULL ) {/* Look for 450NX PXB. Check for problem configurations A PCI quirk checks bit 6 already */ Shouldn't
pci_put_dev()be called after the bridge device no longer needed?
I assume it's not needed anymore after this function is finished...
pci_get_device gets called repeatedly to walk each device. Each call drops the reference to the previous device (the one passed in).
Quoted 8 lines · On Fri, 15 Sep 2006 15:14:38 +0100 Alan Cox <[email protected]> wrote:
Simple conversion
Signed-off-by Alan Cox <[email protected]>diff -u --new-file --recursive --exclude-from
/usr/src/excludelinux.vanilla-2.6.18-rc6-mm1/drivers/ide/pci/piix.clinux-2.6.18-rc6-mm1/drivers/ide/pci/piix.c
drivers/ide/pci/piix.c line 608
Quoted 8 lines
drivers/ide/pci/piix.c +1
-1@@ -602,7 +602,7 @@struct pci_dev *pdev =NULL ;u16 cfg;u8 rev; -while ((pdev=pci_find_device (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_82454NX , pdev))!=NULL ) +while ((pdev=pci_get_device (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_82454NX , pdev))!=NULL ) {/* Look for 450NX PXB. Check for problem configurations A PCI quirk checks bit 6 already */
fwiw, I have an ad450nx server upon which I occasionally test kernels.