dev->dev.parent = parent;
dev->dev.release = of_release_dev;
dev->dev.archdata.of_node = np;
+ dev->dev.of_node = np;
if (bus_id)
dev_set_name(&dev->dev, bus_id);
dev->dev.parent = parent;
dev->dev.release = of_release_dev;
dev->dev.archdata.of_node = np;
+ dev->dev.of_node = np;
if (bus_id)
dev_set_name(&dev->dev, "%s", bus_id);
if (dev->is_added)
continue;
- /* Setup OF node pointer in archdata */
+ /* Setup OF node pointer in the device */
sd->of_node = pci_device_to_OF_node(dev);
+ dev->dev.of_node = pci_device_to_OF_node(dev);
/* Fixup NUMA node as it may not be setup yet by the generic
* code and is needed by the DMA init
if (unit_address != NULL)
viodev->unit_address = *unit_address;
}
- viodev->dev.archdata.of_node = of_node_get(of_node);
+ viodev->dev.of_node = of_node_get(of_node);
+ viodev->dev.archdata.of_node = viodev->dev.of_node;
if (firmware_has_feature(FW_FEATURE_CMO))
vio_cmo_set_dma_ops(viodev);
BUG();
};
+ dev->core.of_node = NULL;
dev->core.archdata.of_node = NULL;
set_dev_node(&dev->core, 0);
sd->prom_node = dp;
sd->op = op;
+ op->dev.of_node = dp;
op->node = dp;
op->clock_freq = of_getintprop_default(dp, "clock-frequency",
sd->prom_node = dp;
sd->op = op;
+ op->dev.of_node = dp;
op->node = dp;
op->clock_freq = of_getintprop_default(dp, "clock-frequency",
sd->stc = &pbm->stc;
sd->host_controller = pbm;
sd->prom_node = node;
+ dev->dev.of_node = node;
sd->op = op = of_find_device_by_node(node);
sd->numa_node = pbm->numa_node;
* can be looked up later */
of_node_get(child);
dev_archdata_set_node(&phy->dev.archdata, child);
+ phy->dev.of_node = child;
/* All data is now stored in the phy struct; register it */
rc = phy_device_register(phy);
/* Store a pointer to the node in the device structure */
of_node_get(nc);
+ spi->dev.of_node = nc;
spi->dev.archdata.of_node = nc;
/* Register the new device */
struct class_private;
struct bus_type;
struct bus_type_private;
+struct device_node;
struct bus_attribute {
struct attribute attr;
override */
/* arch specific additions */
struct dev_archdata archdata;
+#ifdef CONFIG_OF
+ struct device_node *of_node;
+#endif
dev_t devt; /* dev_t, creates the sysfs "dev" */