/* This function gets a string in the format: "PCI:domain:bus:dev.fn" and returns the respective values. If the string is not in this format, it returns 0.  */
static int vga_pci_str_to_vars(char *buf, int count, unsigned int *domain, unsigned int *bus, unsigned int *devfn)
/* This function gets a string in the format: "PCI:domain:bus:dev.fn" and returns the respective values. If the string is not in this format, it returns 0.  */
static int vga_pci_str_to_vars(char *buf, int count, unsigned int *domain, unsigned int *bus, unsigned int *devfn)
{
	int n;
	unsigned int slot, func;
	n = sscanf(buf, "PCI:%x:%x:%x.%x", domain, bus, &slot, &func);
	if (n != 4)
		return 0;
	*devfn = PCI_DEVFN(slot, func);
	return 1;
}