diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2011-06-14 13:04:35 -0600 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2011-07-22 09:08:01 -0700 |
commit | 28c6821a0f8e686d4f1a6107d970705d37475d87 (patch) | |
tree | a62ab9151df067e2976c402944a08b02b8521ee9 /drivers/pci/setup-bus.c | |
parent | 8d6a6a47636648754dc371b01228520a2adaf430 (diff) |
PCI: fold pci_calc_resource_flags() into decode_bar()
decode_bar() and pci_calc_resource_flags() both looked at the PCI BAR
type information, and it's simpler to just do it all in one place.
decode_bar() sets IORESOURCE_IO, IORESOURCE_MEM, and IORESOURCE_MEM_64
as appropriate, so res->flags contains all the information pci_bar_type
does, so we don't need to test the pci_bar_type return value.
decode_bar() used to return pci_bar_type, which we no longer need. We
can simplify it a bit by returning the struct resource flags rather than
updating them internally.
In pci_update_resource(), there's no need to decode the BAR type bits
again; we can just test for IORESOURCE_MEM_64 directly.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/setup-bus.c')
0 files changed, 0 insertions, 0 deletions