From: Bjorn Helgaas Date: Tue, 14 Jun 2011 19:04:35 +0000 (-0600) Subject: PCI: fold pci_calc_resource_flags() into decode_bar() X-Git-Tag: v3.1-rc1~122^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28c6821a0f8e686d4f1a6107d970705d37475d87;p=pandora-kernel.git 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 Signed-off-by: Jesse Barnes --- Reading git-diff-tree failed