aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-04-13 19:12:56 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-05-18 18:10:45 -0400
commit58f9b0b02414062eaff46716bc04b47d7e79add5 (patch)
treefa5265f4c37c2f4afb42a126f39cccc9602e06a2
parent61c7a080a5a061c976988fd4b844dfb468dda255 (diff)
of: eliminate of_device->node and dev_archdata->{of,prom}_node
This patch eliminates the node pointer from struct of_device and the of_node (or prom_node) pointer from struct dev_archdata since the node pointer is now part of struct device proper when CONFIG_OF is set, and all users of the old pointer locations have already been converted over to use device->of_node. Also remove dev_archdata_{get,set}_node() as it is no longer used by anything. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
-rw-r--r--arch/microblaze/include/asm/device.h15
-rw-r--r--arch/microblaze/include/asm/of_device.h1
-rw-r--r--arch/microblaze/kernel/of_device.c4
-rw-r--r--arch/powerpc/include/asm/device.h15
-rw-r--r--arch/powerpc/include/asm/of_device.h1
-rw-r--r--arch/powerpc/kernel/of_device.c4
-rw-r--r--arch/powerpc/kernel/pci-common.c1
-rw-r--r--arch/powerpc/kernel/vio.c17
-rw-r--r--arch/powerpc/platforms/cell/iommu.c5
-rw-r--r--arch/powerpc/platforms/pasemi/setup.c4
-rw-r--r--arch/powerpc/platforms/ps3/system-bus.c1
-rw-r--r--arch/powerpc/platforms/pseries/iommu.c2
-rw-r--r--arch/sparc/include/asm/device.h15
-rw-r--r--arch/sparc/include/asm/of_device.h1
-rw-r--r--arch/sparc/kernel/of_device_32.c2
-rw-r--r--arch/sparc/kernel/of_device_64.c2
-rw-r--r--arch/sparc/kernel/pci.c3
-rw-r--r--drivers/of/of_i2c.c1
-rw-r--r--drivers/of/of_mdio.c1
-rw-r--r--drivers/of/of_spi.c1
20 files changed, 16 insertions, 80 deletions
diff --git a/arch/microblaze/include/asm/device.h b/arch/microblaze/include/asm/device.h
index 402b46e630f..15b0058aa7f 100644
--- a/arch/microblaze/include/asm/device.h
+++ b/arch/microblaze/include/asm/device.h
@@ -12,9 +12,6 @@
12struct device_node; 12struct device_node;
13 13
14struct dev_archdata { 14struct dev_archdata {
15 /* Optional pointer to an OF device node */
16 struct device_node *of_node;
17
18 /* DMA operations on that device */ 15 /* DMA operations on that device */
19 struct dma_map_ops *dma_ops; 16 struct dma_map_ops *dma_ops;
20 void *dma_data; 17 void *dma_data;
@@ -23,18 +20,6 @@ struct dev_archdata {
23struct pdev_archdata { 20struct pdev_archdata {
24}; 21};
25 22
26static inline void dev_archdata_set_node(struct dev_archdata *ad,
27 struct device_node *np)
28{
29 ad->of_node = np;
30}
31
32static inline struct device_node *
33dev_archdata_get_node(const struct dev_archdata *ad)
34{
35 return ad->of_node;
36}
37
38#endif /* _ASM_MICROBLAZE_DEVICE_H */ 23#endif /* _ASM_MICROBLAZE_DEVICE_H */
39 24
40 25
diff --git a/arch/microblaze/include/asm/of_device.h b/arch/microblaze/include/asm/of_device.h
index ba917cfaefe..ab25a40b481 100644
--- a/arch/microblaze/include/asm/of_device.h
+++ b/arch/microblaze/include/asm/of_device.h
@@ -21,7 +21,6 @@
21 * probed using OF properties. 21 * probed using OF properties.
22 */ 22 */
23struct of_device { 23struct of_device {
24 struct device_node *node; /* to be obsoleted */
25 u64 dma_mask; /* DMA mask */ 24 u64 dma_mask; /* DMA mask */
26 struct device dev; /* Generic device interface */ 25 struct device dev; /* Generic device interface */
27}; 26};
diff --git a/arch/microblaze/kernel/of_device.c b/arch/microblaze/kernel/of_device.c
index 90d2246e15c..ac7e6e10d0a 100644
--- a/arch/microblaze/kernel/of_device.c
+++ b/arch/microblaze/kernel/of_device.c
@@ -49,12 +49,10 @@ struct of_device *of_device_alloc(struct device_node *np,
49 if (!dev) 49 if (!dev)
50 return NULL; 50 return NULL;
51 51
52 dev->node = of_node_get(np); 52 dev->dev.of_node = of_node_get(np);
53 dev->dev.dma_mask = &dev->dma_mask; 53 dev->dev.dma_mask = &dev->dma_mask;
54 dev->dev.parent = parent; 54 dev->dev.parent = parent;
55 dev->dev.release = of_release_dev; 55 dev->dev.release = of_release_dev;
56 dev->dev.archdata.of_node = np;
57 dev->dev.of_node = np;
58 56
59 if (bus_id) 57 if (bus_id)
60 dev_set_name(&dev->dev, bus_id); 58 dev_set_name(&dev->dev, bus_id);
diff --git a/arch/powerpc/include/asm/device.h b/arch/powerpc/include/asm/device.h
index 6d94d27ed85..f23f8d8bd68 100644
--- a/arch/powerpc/include/asm/device.h
+++ b/arch/powerpc/include/asm/device.h
@@ -10,9 +10,6 @@ struct dma_map_ops;
10struct device_node; 10struct device_node;
11 11
12struct dev_archdata { 12struct dev_archdata {
13 /* Optional pointer to an OF device node */
14 struct device_node *of_node;
15
16 /* DMA operations on that device */ 13 /* DMA operations on that device */
17 struct dma_map_ops *dma_ops; 14 struct dma_map_ops *dma_ops;
18 15
@@ -30,18 +27,6 @@ struct dev_archdata {
30#endif 27#endif
31}; 28};
32 29
33static inline void dev_archdata_set_node(struct dev_archdata *ad,
34 struct device_node *np)
35{
36 ad->of_node = np;
37}
38
39static inline struct device_node *
40dev_archdata_get_node(const struct dev_archdata *ad)
41{
42 return ad->of_node;
43}
44
45struct pdev_archdata { 30struct pdev_archdata {
46}; 31};
47 32
diff --git a/arch/powerpc/include/asm/of_device.h b/arch/powerpc/include/asm/of_device.h
index a64debf177d..8b26f96b9f9 100644
--- a/arch/powerpc/include/asm/of_device.h
+++ b/arch/powerpc/include/asm/of_device.h
@@ -12,7 +12,6 @@
12 */ 12 */
13struct of_device 13struct of_device
14{ 14{
15 struct device_node *node; /* to be obsoleted */
16 u64 dma_mask; /* DMA mask */ 15 u64 dma_mask; /* DMA mask */
17 struct device dev; /* Generic device interface */ 16 struct device dev; /* Generic device interface */
18}; 17};
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c
index 285c8490c54..20b3474b6f6 100644
--- a/arch/powerpc/kernel/of_device.c
+++ b/arch/powerpc/kernel/of_device.c
@@ -69,12 +69,10 @@ struct of_device *of_device_alloc(struct device_node *np,
69 if (!dev) 69 if (!dev)
70 return NULL; 70 return NULL;
71 71
72 dev->node = of_node_get(np); 72 dev->dev.of_node = of_node_get(np);
73 dev->dev.dma_mask = &dev->dma_mask; 73 dev->dev.dma_mask = &dev->dma_mask;
74 dev->dev.parent = parent; 74 dev->dev.parent = parent;
75 dev->dev.release = of_release_dev; 75 dev->dev.release = of_release_dev;
76 dev->dev.archdata.of_node = np;
77 dev->dev.of_node = np;
78 76
79 if (bus_id) 77 if (bus_id)
80 dev_set_name(&dev->dev, "%s", bus_id); 78 dev_set_name(&dev->dev, "%s", bus_id);
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 88da282047c..6646005dffb 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -1098,7 +1098,6 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)
1098 continue; 1098 continue;
1099 1099
1100 /* Setup OF node pointer in the device */ 1100 /* Setup OF node pointer in the device */
1101 sd->of_node = pci_device_to_OF_node(dev);
1102 dev->dev.of_node = pci_device_to_OF_node(dev); 1101 dev->dev.of_node = pci_device_to_OF_node(dev);
1103 1102
1104 /* Fixup NUMA node as it may not be setup yet by the generic 1103 /* Fixup NUMA node as it may not be setup yet by the generic
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index d6708da114e..4cdd0f6df8b 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -705,7 +705,7 @@ static int vio_cmo_bus_probe(struct vio_dev *viodev)
705 * Check to see that device has a DMA window and configure 705 * Check to see that device has a DMA window and configure
706 * entitlement for the device. 706 * entitlement for the device.
707 */ 707 */
708 if (of_get_property(viodev->dev.archdata.of_node, 708 if (of_get_property(viodev->dev.of_node,
709 "ibm,my-dma-window", NULL)) { 709 "ibm,my-dma-window", NULL)) {
710 /* Check that the driver is CMO enabled and get desired DMA */ 710 /* Check that the driver is CMO enabled and get desired DMA */
711 if (!viodrv->get_desired_dma) { 711 if (!viodrv->get_desired_dma) {
@@ -1049,7 +1049,7 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)
1049 if (firmware_has_feature(FW_FEATURE_ISERIES)) 1049 if (firmware_has_feature(FW_FEATURE_ISERIES))
1050 return vio_build_iommu_table_iseries(dev); 1050 return vio_build_iommu_table_iseries(dev);
1051 1051
1052 dma_window = of_get_property(dev->dev.archdata.of_node, 1052 dma_window = of_get_property(dev->dev.of_node,
1053 "ibm,my-dma-window", NULL); 1053 "ibm,my-dma-window", NULL);
1054 if (!dma_window) 1054 if (!dma_window)
1055 return NULL; 1055 return NULL;
@@ -1058,7 +1058,7 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)
1058 if (tbl == NULL) 1058 if (tbl == NULL)
1059 return NULL; 1059 return NULL;
1060 1060
1061 of_parse_dma_window(dev->dev.archdata.of_node, dma_window, 1061 of_parse_dma_window(dev->dev.of_node, dma_window,
1062 &tbl->it_index, &offset, &size); 1062 &tbl->it_index, &offset, &size);
1063 1063
1064 /* TCE table size - measured in tce entries */ 1064 /* TCE table size - measured in tce entries */
@@ -1086,7 +1086,7 @@ static const struct vio_device_id *vio_match_device(
1086{ 1086{
1087 while (ids->type[0] != '\0') { 1087 while (ids->type[0] != '\0') {
1088 if ((strncmp(dev->type, ids->type, strlen(ids->type)) == 0) && 1088 if ((strncmp(dev->type, ids->type, strlen(ids->type)) == 0) &&
1089 of_device_is_compatible(dev->dev.archdata.of_node, 1089 of_device_is_compatible(dev->dev.of_node,
1090 ids->compat)) 1090 ids->compat))
1091 return ids; 1091 return ids;
1092 ids++; 1092 ids++;
@@ -1179,7 +1179,7 @@ EXPORT_SYMBOL(vio_unregister_driver);
1179static void __devinit vio_dev_release(struct device *dev) 1179static void __devinit vio_dev_release(struct device *dev)
1180{ 1180{
1181 /* XXX should free TCE table */ 1181 /* XXX should free TCE table */
1182 of_node_put(dev->archdata.of_node); 1182 of_node_put(dev->of_node);
1183 kfree(to_vio_dev(dev)); 1183 kfree(to_vio_dev(dev));
1184} 1184}
1185 1185
@@ -1231,7 +1231,6 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node)
1231 viodev->unit_address = *unit_address; 1231 viodev->unit_address = *unit_address;
1232 } 1232 }
1233 viodev->dev.of_node = of_node_get(of_node); 1233 viodev->dev.of_node = of_node_get(of_node);
1234 viodev->dev.archdata.of_node = viodev->dev.of_node;
1235 1234
1236 if (firmware_has_feature(FW_FEATURE_CMO)) 1235 if (firmware_has_feature(FW_FEATURE_CMO))
1237 vio_cmo_set_dma_ops(viodev); 1236 vio_cmo_set_dma_ops(viodev);
@@ -1316,7 +1315,7 @@ static ssize_t name_show(struct device *dev,
1316static ssize_t devspec_show(struct device *dev, 1315static ssize_t devspec_show(struct device *dev,
1317 struct device_attribute *attr, char *buf) 1316 struct device_attribute *attr, char *buf)
1318{ 1317{
1319 struct device_node *of_node = dev->archdata.of_node; 1318 struct device_node *of_node = dev->of_node;
1320 1319
1321 return sprintf(buf, "%s\n", of_node ? of_node->full_name : "none"); 1320 return sprintf(buf, "%s\n", of_node ? of_node->full_name : "none");
1322} 1321}
@@ -1348,7 +1347,7 @@ static int vio_hotplug(struct device *dev, struct kobj_uevent_env *env)
1348 struct device_node *dn; 1347 struct device_node *dn;
1349 const char *cp; 1348 const char *cp;
1350 1349
1351 dn = dev->archdata.of_node; 1350 dn = dev->of_node;
1352 if (!dn) 1351 if (!dn)
1353 return -ENODEV; 1352 return -ENODEV;
1354 cp = of_get_property(dn, "compatible", NULL); 1353 cp = of_get_property(dn, "compatible", NULL);
@@ -1379,7 +1378,7 @@ static struct bus_type vio_bus_type = {
1379*/ 1378*/
1380const void *vio_get_attribute(struct vio_dev *vdev, char *which, int *length) 1379const void *vio_get_attribute(struct vio_dev *vdev, char *which, int *length)
1381{ 1380{
1382 return of_get_property(vdev->dev.archdata.of_node, which, length); 1381 return of_get_property(vdev->dev.of_node, which, length);
1383} 1382}
1384EXPORT_SYMBOL(vio_get_attribute); 1383EXPORT_SYMBOL(vio_get_attribute);
1385 1384
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index e3ec4976fae..22667a09d40 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -545,7 +545,6 @@ static struct iommu_table *cell_get_iommu_table(struct device *dev)
545{ 545{
546 struct iommu_window *window; 546 struct iommu_window *window;
547 struct cbe_iommu *iommu; 547 struct cbe_iommu *iommu;
548 struct dev_archdata *archdata = &dev->archdata;
549 548
550 /* Current implementation uses the first window available in that 549 /* Current implementation uses the first window available in that
551 * node's iommu. We -might- do something smarter later though it may 550 * node's iommu. We -might- do something smarter later though it may
@@ -554,7 +553,7 @@ static struct iommu_table *cell_get_iommu_table(struct device *dev)
554 iommu = cell_iommu_for_node(dev_to_node(dev)); 553 iommu = cell_iommu_for_node(dev_to_node(dev));
555 if (iommu == NULL || list_empty(&iommu->windows)) { 554 if (iommu == NULL || list_empty(&iommu->windows)) {
556 printk(KERN_ERR "iommu: missing iommu for %s (node %d)\n", 555 printk(KERN_ERR "iommu: missing iommu for %s (node %d)\n",
557 archdata->of_node ? archdata->of_node->full_name : "?", 556 dev->of_node ? dev->of_node->full_name : "?",
558 dev_to_node(dev)); 557 dev_to_node(dev));
559 return NULL; 558 return NULL;
560 } 559 }
@@ -897,7 +896,7 @@ static u64 cell_iommu_get_fixed_address(struct device *dev)
897 const u32 *ranges = NULL; 896 const u32 *ranges = NULL;
898 int i, len, best, naddr, nsize, pna, range_size; 897 int i, len, best, naddr, nsize, pna, range_size;
899 898
900 np = of_node_get(dev->archdata.of_node); 899 np = of_node_get(dev->of_node);
901 while (1) { 900 while (1) {
902 naddr = of_n_addr_cells(np); 901 naddr = of_n_addr_cells(np);
903 nsize = of_n_size_cells(np); 902 nsize = of_n_size_cells(np);
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index ac6fdd97329..f372ec1691a 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -360,10 +360,10 @@ static int pcmcia_notify(struct notifier_block *nb, unsigned long action,
360 /* We know electra_cf devices will always have of_node set, since 360 /* We know electra_cf devices will always have of_node set, since
361 * electra_cf is an of_platform driver. 361 * electra_cf is an of_platform driver.
362 */ 362 */
363 if (!parent->archdata.of_node) 363 if (!parent->of_node)
364 return 0; 364 return 0;
365 365
366 if (!of_device_is_compatible(parent->archdata.of_node, "electra-cf")) 366 if (!of_device_is_compatible(parent->of_node, "electra-cf"))
367 return 0; 367 return 0;
368 368
369 /* We use the direct ops for localbus */ 369 /* We use the direct ops for localbus */
diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c
index e546c86a539..23083c39752 100644
--- a/arch/powerpc/platforms/ps3/system-bus.c
+++ b/arch/powerpc/platforms/ps3/system-bus.c
@@ -767,7 +767,6 @@ int ps3_system_bus_device_register(struct ps3_system_bus_device *dev)
767 }; 767 };
768 768
769 dev->core.of_node = NULL; 769 dev->core.of_node = NULL;
770 dev->core.archdata.of_node = NULL;
771 set_dev_node(&dev->core, 0); 770 set_dev_node(&dev->core, 0);
772 771
773 pr_debug("%s:%d add %s\n", __func__, __LINE__, dev_name(&dev->core)); 772 pr_debug("%s:%d add %s\n", __func__, __LINE__, dev_name(&dev->core));
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index 1a0000a4b6d..d26182d42cb 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -468,7 +468,7 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev)
468 468
469 pr_debug("pci_dma_dev_setup_pSeries: %s\n", pci_name(dev)); 469 pr_debug("pci_dma_dev_setup_pSeries: %s\n", pci_name(dev));
470 470
471 dn = dev->dev.archdata.of_node; 471 dn = dev->dev.of_node;
472 472
473 /* If we're the direct child of a root bus, then we need to allocate 473 /* If we're the direct child of a root bus, then we need to allocate
474 * an iommu table ourselves. The bus setup code should have setup 474 * an iommu table ourselves. The bus setup code should have setup
diff --git a/arch/sparc/include/asm/device.h b/arch/sparc/include/asm/device.h
index f3b85b6b0b7..d4c45214741 100644
--- a/arch/sparc/include/asm/device.h
+++ b/arch/sparc/include/asm/device.h
@@ -13,25 +13,10 @@ struct dev_archdata {
13 void *iommu; 13 void *iommu;
14 void *stc; 14 void *stc;
15 void *host_controller; 15 void *host_controller;
16
17 struct device_node *prom_node;
18 struct of_device *op; 16 struct of_device *op;
19
20 int numa_node; 17 int numa_node;
21}; 18};
22 19
23static inline void dev_archdata_set_node(struct dev_archdata *ad,
24 struct device_node *np)
25{
26 ad->prom_node = np;
27}
28
29static inline struct device_node *
30dev_archdata_get_node(const struct dev_archdata *ad)
31{
32 return ad->prom_node;
33}
34
35struct pdev_archdata { 20struct pdev_archdata {
36}; 21};
37 22
diff --git a/arch/sparc/include/asm/of_device.h b/arch/sparc/include/asm/of_device.h
index a5d9811f969..f320246a058 100644
--- a/arch/sparc/include/asm/of_device.h
+++ b/arch/sparc/include/asm/of_device.h
@@ -14,7 +14,6 @@
14 */ 14 */
15struct of_device 15struct of_device
16{ 16{
17 struct device_node *node;
18 struct device dev; 17 struct device dev;
19 struct resource resource[PROMREG_MAX]; 18 struct resource resource[PROMREG_MAX];
20 unsigned int irqs[PROMINTR_MAX]; 19 unsigned int irqs[PROMINTR_MAX];
diff --git a/arch/sparc/kernel/of_device_32.c b/arch/sparc/kernel/of_device_32.c
index 70731171614..47e63f1e719 100644
--- a/arch/sparc/kernel/of_device_32.c
+++ b/arch/sparc/kernel/of_device_32.c
@@ -345,11 +345,9 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
345 return NULL; 345 return NULL;
346 346
347 sd = &op->dev.archdata; 347 sd = &op->dev.archdata;
348 sd->prom_node = dp;
349 sd->op = op; 348 sd->op = op;
350 349
351 op->dev.of_node = dp; 350 op->dev.of_node = dp;
352 op->node = dp;
353 351
354 op->clock_freq = of_getintprop_default(dp, "clock-frequency", 352 op->clock_freq = of_getintprop_default(dp, "clock-frequency",
355 (25*1000*1000)); 353 (25*1000*1000));
diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c
index c8e352e0a09..1dae8079f72 100644
--- a/arch/sparc/kernel/of_device_64.c
+++ b/arch/sparc/kernel/of_device_64.c
@@ -640,11 +640,9 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
640 return NULL; 640 return NULL;
641 641
642 sd = &op->dev.archdata; 642 sd = &op->dev.archdata;
643 sd->prom_node = dp;
644 sd->op = op; 643 sd->op = op;
645 644
646 op->dev.of_node = dp; 645 op->dev.of_node = dp;
647 op->node = dp;
648 646
649 op->clock_freq = of_getintprop_default(dp, "clock-frequency", 647 op->clock_freq = of_getintprop_default(dp, "clock-frequency",
650 (25*1000*1000)); 648 (25*1000*1000));
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index c7a214ec5af..8a8363adb8b 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -261,8 +261,6 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
261 sd->iommu = pbm->iommu; 261 sd->iommu = pbm->iommu;
262 sd->stc = &pbm->stc; 262 sd->stc = &pbm->stc;
263 sd->host_controller = pbm; 263 sd->host_controller = pbm;
264 sd->prom_node = node;
265 dev->dev.of_node = node;
266 sd->op = op = of_find_device_by_node(node); 264 sd->op = op = of_find_device_by_node(node);
267 sd->numa_node = pbm->numa_node; 265 sd->numa_node = pbm->numa_node;
268 266
@@ -286,6 +284,7 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
286 dev->sysdata = node; 284 dev->sysdata = node;
287 dev->dev.parent = bus->bridge; 285 dev->dev.parent = bus->bridge;
288 dev->dev.bus = &pci_bus_type; 286 dev->dev.bus = &pci_bus_type;
287 dev->dev.of_node = node;
289 dev->devfn = devfn; 288 dev->devfn = devfn;
290 dev->multifunction = 0; /* maybe a lie? */ 289 dev->multifunction = 0; /* maybe a lie? */
291 set_pcie_port_type(dev); 290 set_pcie_port_type(dev);
diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c
index 604ba966e1c..ab6522c8e4f 100644
--- a/drivers/of/of_i2c.c
+++ b/drivers/of/of_i2c.c
@@ -42,7 +42,6 @@ void of_register_i2c_devices(struct i2c_adapter *adap,
42 42
43 info.addr = be32_to_cpup(addr); 43 info.addr = be32_to_cpup(addr);
44 44
45 dev_archdata_set_node(&dev_ad, node);
46 info.of_node = node; 45 info.of_node = node;
47 info.archdata = &dev_ad; 46 info.archdata = &dev_ad;
48 47
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index 01d794abe10..794fbc2ef73 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -79,7 +79,6 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
79 /* Associate the OF node with the device structure so it 79 /* Associate the OF node with the device structure so it
80 * can be looked up later */ 80 * can be looked up later */
81 of_node_get(child); 81 of_node_get(child);
82 dev_archdata_set_node(&phy->dev.archdata, child);
83 phy->dev.of_node = child; 82 phy->dev.of_node = child;
84 83
85 /* All data is now stored in the phy struct; register it */ 84 /* All data is now stored in the phy struct; register it */
diff --git a/drivers/of/of_spi.c b/drivers/of/of_spi.c
index f3119a0836a..5fed7e3c7da 100644
--- a/drivers/of/of_spi.c
+++ b/drivers/of/of_spi.c
@@ -80,7 +80,6 @@ void of_register_spi_devices(struct spi_master *master, struct device_node *np)
80 /* Store a pointer to the node in the device structure */ 80 /* Store a pointer to the node in the device structure */
81 of_node_get(nc); 81 of_node_get(nc);
82 spi->dev.of_node = nc; 82 spi->dev.of_node = nc;
83 spi->dev.archdata.of_node = nc;
84 83
85 /* Register the new device */ 84 /* Register the new device */
86 request_module(spi->modalias); 85 request_module(spi->modalias);