lkml.org 
[lkml]   [2004]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PPC] Missing pci_dev_put in arch/ppc/platforms/chrp_pci.c ?
Date
This is how it is:

chrp_pcibios_fixup(void)
{
struct pci_dev *dev = NULL;
struct device_node *np;

/* PCI interrupts are controlled by the OpenPIC */
for_each_pci_dev(dev) {
np = pci_device_to_OF_node(dev);
if ((np != 0) && (np->n_intrs > 0) && (np->intrs[0].line != 0))
dev->irq = np->intrs[0].line;
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
}
}

for_each_pci_dev is defined to use pci_get_device in include/linux/pci.h,
which uses pci_dev_get. So every PCI devices use count will be incremented
if chrp_pcibios_fixup is called. Do I miss something or should we add a
pci_dev_put(dev) at the end of the loop?

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

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.035 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site