pci_free_caps(d);
pci_free_properties(d);
-
- pci_mfree(d->module_alias);
- pci_mfree(d->label);
- pci_mfree(d->phy_slot);
-
pci_mfree(d);
}
pci_reset_properties(struct pci_dev *d)
{
d->known_fields = 0;
+ d->phy_slot = NULL;
+ d->module_alias = NULL;
+ d->label = NULL;
pci_free_caps(d);
pci_free_properties(d);
}
{
for (d = a->devices; d; d = d->next)
if (dom == (unsigned)d->domain && bus == d->bus && dev == d->dev && !d->phy_slot)
- d->phy_slot = pci_strdup(a, entry->d_name);
+ d->phy_slot = pci_set_property(d, PCI_FILL_PHYS_SLOT, entry->d_name);
}
fclose(file);
}
{
char buf[OBJBUFSIZE];
if (sysfs_get_string(d, "modalias", buf, 0))
- d->module_alias = pci_strdup(d->access, buf);
+ d->module_alias = pci_set_property(d, PCI_FILL_MODULE_ALIAS, buf);
}
if ((flags & PCI_FILL_LABEL) && !(d->known_fields & PCI_FILL_LABEL))
{
char buf[OBJBUFSIZE];
if (sysfs_get_string(d, "label", buf, 0))
- d->label = pci_strdup(d->access, buf);
+ d->label = pci_set_property(d, PCI_FILL_LABEL, buf);
}
if ((flags & PCI_FILL_NUMA_NODE) && !(d->known_fields & PCI_FILL_NUMA_NODE))