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:
parent
74cd948ed3
commit
6939e0826c
1 changed files with 8 additions and 5 deletions
|
@ -373,11 +373,14 @@ int pci_bus_scan(struct pci_dev_info *dev_info)
|
||||||
{
|
{
|
||||||
union pci_addr_reg pci_ctrl_addr;
|
union pci_addr_reg pci_ctrl_addr;
|
||||||
|
|
||||||
if (!lookup.info.class_type &&
|
int init_from_dev_info =
|
||||||
!lookup.info.vendor_id &&
|
!lookup.info.class_type &&
|
||||||
!lookup.info.device_id &&
|
!lookup.info.vendor_id &&
|
||||||
lookup.info.bar == PCI_BAR_ANY &&
|
!lookup.info.device_id &&
|
||||||
lookup.info.function == PCI_FUNCTION_ANY) {
|
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.class_type = dev_info->class_type;
|
||||||
lookup.info.vendor_id = dev_info->vendor_id;
|
lookup.info.vendor_id = dev_info->vendor_id;
|
||||||
lookup.info.device_id = dev_info->device_id;
|
lookup.info.device_id = dev_info->device_id;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue