diff options
Diffstat (limited to 'arch/powerpc/kernel/vio.c')
-rw-r--r-- | arch/powerpc/kernel/vio.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index 2968ffeafdb6..9eaefac5053f 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c | |||
@@ -81,7 +81,7 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev) | |||
81 | struct iommu_table *tbl; | 81 | struct iommu_table *tbl; |
82 | unsigned long offset, size; | 82 | unsigned long offset, size; |
83 | 83 | ||
84 | dma_window = get_property(dev->dev.archdata.of_node, | 84 | dma_window = of_get_property(dev->dev.archdata.of_node, |
85 | "ibm,my-dma-window", NULL); | 85 | "ibm,my-dma-window", NULL); |
86 | if (!dma_window) | 86 | if (!dma_window) |
87 | return NULL; | 87 | return NULL; |
@@ -226,7 +226,7 @@ struct vio_dev * __devinit vio_register_device_node(struct device_node *of_node) | |||
226 | return NULL; | 226 | return NULL; |
227 | } | 227 | } |
228 | 228 | ||
229 | unit_address = get_property(of_node, "reg", NULL); | 229 | unit_address = of_get_property(of_node, "reg", NULL); |
230 | if (unit_address == NULL) { | 230 | if (unit_address == NULL) { |
231 | printk(KERN_WARNING "%s: node %s missing 'reg'\n", | 231 | printk(KERN_WARNING "%s: node %s missing 'reg'\n", |
232 | __FUNCTION__, | 232 | __FUNCTION__, |
@@ -246,7 +246,7 @@ struct vio_dev * __devinit vio_register_device_node(struct device_node *of_node) | |||
246 | viodev->type = of_node->type; | 246 | viodev->type = of_node->type; |
247 | viodev->unit_address = *unit_address; | 247 | viodev->unit_address = *unit_address; |
248 | if (firmware_has_feature(FW_FEATURE_ISERIES)) { | 248 | if (firmware_has_feature(FW_FEATURE_ISERIES)) { |
249 | unit_address = get_property(of_node, | 249 | unit_address = of_get_property(of_node, |
250 | "linux,unit_address", NULL); | 250 | "linux,unit_address", NULL); |
251 | if (unit_address != NULL) | 251 | if (unit_address != NULL) |
252 | viodev->unit_address = *unit_address; | 252 | viodev->unit_address = *unit_address; |
@@ -308,7 +308,7 @@ static int __init vio_bus_init(void) | |||
308 | return err; | 308 | return err; |
309 | } | 309 | } |
310 | 310 | ||
311 | node_vroot = find_devices("vdevice"); | 311 | node_vroot = of_find_node_by_name(NULL, "vdevice"); |
312 | if (node_vroot) { | 312 | if (node_vroot) { |
313 | struct device_node *of_node; | 313 | struct device_node *of_node; |
314 | 314 | ||
@@ -322,6 +322,7 @@ static int __init vio_bus_init(void) | |||
322 | __FUNCTION__, of_node); | 322 | __FUNCTION__, of_node); |
323 | vio_register_device_node(of_node); | 323 | vio_register_device_node(of_node); |
324 | } | 324 | } |
325 | of_node_put(node_vroot); | ||
325 | } | 326 | } |
326 | 327 | ||
327 | return 0; | 328 | return 0; |
@@ -377,7 +378,7 @@ static int vio_hotplug(struct device *dev, char **envp, int num_envp, | |||
377 | dn = dev->archdata.of_node; | 378 | dn = dev->archdata.of_node; |
378 | if (!dn) | 379 | if (!dn) |
379 | return -ENODEV; | 380 | return -ENODEV; |
380 | cp = get_property(dn, "compatible", &length); | 381 | cp = of_get_property(dn, "compatible", &length); |
381 | if (!cp) | 382 | if (!cp) |
382 | return -ENODEV; | 383 | return -ENODEV; |
383 | 384 | ||
@@ -406,12 +407,12 @@ struct bus_type vio_bus_type = { | |||
406 | * @which: The property/attribute to be extracted. | 407 | * @which: The property/attribute to be extracted. |
407 | * @length: Pointer to length of returned data size (unused if NULL). | 408 | * @length: Pointer to length of returned data size (unused if NULL). |
408 | * | 409 | * |
409 | * Calls prom.c's get_property() to return the value of the | 410 | * Calls prom.c's of_get_property() to return the value of the |
410 | * attribute specified by @which | 411 | * attribute specified by @which |
411 | */ | 412 | */ |
412 | const void *vio_get_attribute(struct vio_dev *vdev, char *which, int *length) | 413 | const void *vio_get_attribute(struct vio_dev *vdev, char *which, int *length) |
413 | { | 414 | { |
414 | return get_property(vdev->dev.archdata.of_node, which, length); | 415 | return of_get_property(vdev->dev.archdata.of_node, which, length); |
415 | } | 416 | } |
416 | EXPORT_SYMBOL(vio_get_attribute); | 417 | EXPORT_SYMBOL(vio_get_attribute); |
417 | 418 | ||
@@ -443,7 +444,7 @@ struct vio_dev *vio_find_node(struct device_node *vnode) | |||
443 | char kobj_name[BUS_ID_SIZE]; | 444 | char kobj_name[BUS_ID_SIZE]; |
444 | 445 | ||
445 | /* construct the kobject name from the device node */ | 446 | /* construct the kobject name from the device node */ |
446 | unit_address = get_property(vnode, "reg", NULL); | 447 | unit_address = of_get_property(vnode, "reg", NULL); |
447 | if (!unit_address) | 448 | if (!unit_address) |
448 | return NULL; | 449 | return NULL; |
449 | snprintf(kobj_name, BUS_ID_SIZE, "%x", *unit_address); | 450 | snprintf(kobj_name, BUS_ID_SIZE, "%x", *unit_address); |