/* This function expects to be called with @entry->rw_lock write-hold.  */
static int pdcspath_fetch(struct pdcspath_entry *entry)
/* This function expects to be called with @entry->rw_lock write-hold.  */
static int pdcspath_fetch(struct pdcspath_entry *entry)
{
	struct device_path *devpath;
	if (!entry)
		return -EINVAL;
	devpath = &entry->devpath;
	DPRINTK("%s: fetch: 0x%p, 0x%p, addr: 0x%lx\n", __func__,
			entry, devpath, entry->addr);
	if (pdc_stable_read(entry->addr, devpath, sizeof(*devpath)) != PDC_OK)
		return -EIO;
	entry->dev = hwpath_to_device((struct hardware_path *)devpath);
	entry->ready = 1;
	DPRINTK("%s: device: 0x%p\n", __func__, entry->dev);
	return 0;
}