diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-04-13 19:12:56 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-05-18 18:10:45 -0400 |
commit | 58f9b0b02414062eaff46716bc04b47d7e79add5 (patch) | |
tree | fa5265f4c37c2f4afb42a126f39cccc9602e06a2 /arch/powerpc/kernel/vio.c | |
parent | 61c7a080a5a061c976988fd4b844dfb468dda255 (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>
Diffstat (limited to 'arch/powerpc/kernel/vio.c')
-rw-r--r-- | arch/powerpc/kernel/vio.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index d6708da114ee..4cdd0f6df8bf 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); | |||
1179 | static void __devinit vio_dev_release(struct device *dev) | 1179 | static 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, | |||
1316 | static ssize_t devspec_show(struct device *dev, | 1315 | static 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 | */ |
1380 | const void *vio_get_attribute(struct vio_dev *vdev, char *which, int *length) | 1379 | const 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 | } |
1384 | EXPORT_SYMBOL(vio_get_attribute); | 1383 | EXPORT_SYMBOL(vio_get_attribute); |
1385 | 1384 | ||