Re: [PATCH] piix: Use refcounted interface when searching for a450NX

From: Alan Cox
Date: Fri Sep 15 2006 - 10:21:26 EST


Ar Gwe, 2006-09-15 am 18:14 +0400, ysgrifennodd Sergei Shtylyov:
> > - 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).


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