]> git.baikalelectronics.ru Git - kernel.git/commit
PCI Hotplug: cpqphp: clean up accesses to pcibios_get_irq_routing_table()
authorAlex Chiang <achiang@hp.com>
Tue, 31 Mar 2009 15:24:02 +0000 (09:24 -0600)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Thu, 11 Jun 2009 19:04:14 +0000 (12:04 -0700)
commit4803d256c040b171dde7eec15ca4df393f89b7bd
treed6f2cea2323cbd0b8b403ab59eec9f527a0ab026
parentf0775f462ac21f5121b4f1513a33af75070d56f3
PCI Hotplug: cpqphp: clean up accesses to pcibios_get_irq_routing_table()

Instead of making multiple calls to pcibios_get_irq_routing_table, let's
just do it once and save the answer.

The reason we were making multiple calls is because we liked to calculate
its length and perform some loop over it. Instead of open-coding the length
calculation every time, provide it in an inline helper function.

Finally, since pci_print_IRQ_route() is used only for debug, let's only
do it when cpqhp_debug is set.

Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/hotplug/cpqphp.h
drivers/pci/hotplug/cpqphp_core.c
drivers/pci/hotplug/cpqphp_pci.c