pci: trivial if statement refactoring

It was hard to see where the condition ended and the code block started.

Change-Id: If966b0a404beb1c783a1c8dd89e6049a6600cadf
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
Benjamin Walsh 2016-02-17 13:50:13 -05:00
commit 6939e0826c

View file

@ -373,11 +373,14 @@ int pci_bus_scan(struct pci_dev_info *dev_info)
{
union pci_addr_reg pci_ctrl_addr;
if (!lookup.info.class_type &&
!lookup.info.vendor_id &&
!lookup.info.device_id &&
lookup.info.bar == PCI_BAR_ANY &&
lookup.info.function == PCI_FUNCTION_ANY) {
int init_from_dev_info =
!lookup.info.class_type &&
!lookup.info.vendor_id &&
!lookup.info.device_id &&
lookup.info.bar == PCI_BAR_ANY &&
lookup.info.function == PCI_FUNCTION_ANY;
if (init_from_dev_info) {
lookup.info.class_type = dev_info->class_type;
lookup.info.vendor_id = dev_info->vendor_id;
lookup.info.device_id = dev_info->device_id;