Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
[linux-2.6.git] / drivers / scsi / ibmvscsi / ibmvstgt.c
index 84363c18162006fe7c7846bc005772df44f8040f..6d223dd76440cc1cf8df4d5e2f82af7835512058 100644 (file)
@@ -886,9 +886,9 @@ static int get_system_info(void)
 {
        struct device_node *rootdn;
        const char *id, *model, *name;
 {
        struct device_node *rootdn;
        const char *id, *model, *name;
-       unsigned int *num;
+       const unsigned int *num;
 
 
-       rootdn = find_path_device("/");
+       rootdn = of_find_node_by_path("/");
        if (!rootdn)
                return -ENOENT;
 
        if (!rootdn)
                return -ENOENT;
 
@@ -901,10 +901,11 @@ static int get_system_info(void)
        if (name)
                strncpy(partition_name, name, sizeof(partition_name));
 
        if (name)
                strncpy(partition_name, name, sizeof(partition_name));
 
-       num = (unsigned int *) get_property(rootdn, "ibm,partition-no", NULL);
+       num = get_property(rootdn, "ibm,partition-no", NULL);
        if (num)
                partition_number = *num;
 
        if (num)
                partition_number = *num;
 
+       of_node_put(rootdn);
        return 0;
 }
 
        return 0;
 }