/* This helper routine makes bar mask from the type of resource.  */
int pci_select_bars(struct pci_dev *dev, unsigned long flags)
/* This helper routine makes bar mask from the type of resource.  */
int pci_select_bars(struct pci_dev *dev, unsigned long flags)
{
	int i, bars = 0;
	for (i = 0; i < PCI_NUM_RESOURCES; i++)
		if (pci_resource_flags(dev, i) & flags)
			bars |= (1 << i);
	return bars;
}