/* If we created resource files for @dev, remove them from sysfs and free their resources.  */
void pci_remove_resource_files(struct pci_dev *pdev)
/* If we created resource files for @dev, remove them from sysfs and free their resources.  */
void pci_remove_resource_files(struct pci_dev *pdev)
{
	int i;
	for (i = 0; i < PCI_ROM_RESOURCE; i++) {
		struct bin_attribute *res_attr;
		res_attr = pdev->res_attr[i];
		if (res_attr) {
			sysfs_remove_bin_file(&pdev->dev.kobj, res_attr);
			kfree(res_attr);
		}
		res_attr = pdev->res_attr_wc[i];
		if (res_attr) {
			sysfs_remove_bin_file(&pdev->dev.kobj, res_attr);
			kfree(res_attr);
		}
	}
}