Merge branch 'tmpreg' into devel
[safe/jmp/linux-2.6] / arch / powerpc / platforms / iseries / vio.c
index 910b00b..2aa8b56 100644 (file)
@@ -2,7 +2,7 @@
  * Legacy iSeries specific vio initialisation
  * that needs to be built in (not a module).
  *
- * Â© Copyright 2007 IBM Corporation
+ * © Copyright 2007 IBM Corporation
  *     Author: Stephen Rothwell
  *     Some parts collected from various other files
  *
@@ -75,7 +75,7 @@ static struct property *new_property(const char *name, int length,
        return np;
 }
 
-static void __init free_property(struct property *np)
+static void free_property(struct property *np)
 {
        kfree(np);
 }
@@ -474,6 +474,8 @@ static void __init get_viotape_info(struct device_node *vio_root)
        struct vio_waitevent we;
        int ret;
 
+       init_completion(&we.com);
+
        ret = viopath_open(viopath_hostLp, viomajorsubtype_tape, 2);
        if (ret) {
                printk(KERN_WARNING "get_viotape_info: "
@@ -523,15 +525,16 @@ static void __init get_viotape_info(struct device_node *vio_root)
 static int __init iseries_vio_init(void)
 {
        struct device_node *vio_root;
+       int ret = -ENODEV;
 
        if (!firmware_has_feature(FW_FEATURE_ISERIES))
-               return -ENODEV;
+               goto out;
 
        iommu_vio_init();
 
        vio_root = of_find_node_by_path("/vdevice");
        if (!vio_root)
-               return -ENODEV;
+               goto out;
 
        if (viopath_hostLp == HvLpIndexInvalid) {
                vio_set_hostlp();
@@ -544,10 +547,11 @@ static int __init iseries_vio_init(void)
        get_viocd_info(vio_root);
        get_viotape_info(vio_root);
 
-       return 0;
+       ret = 0;
 
  put_node:
        of_node_put(vio_root);
-       return -ENODEV;
+ out:
+       return ret;
 }
 arch_initcall(iseries_vio_init);