diff options
Diffstat (limited to 'drivers/scsi/ibmvscsi/ibmvstgt.c')
-rw-r--r-- | drivers/scsi/ibmvscsi/ibmvstgt.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvstgt.c b/drivers/scsi/ibmvscsi/ibmvstgt.c index 4368ca0e8270..a39a478bb39a 100644 --- a/drivers/scsi/ibmvscsi/ibmvstgt.c +++ b/drivers/scsi/ibmvscsi/ibmvstgt.c | |||
@@ -897,9 +897,9 @@ static int get_system_info(void) | |||
897 | { | 897 | { |
898 | struct device_node *rootdn; | 898 | struct device_node *rootdn; |
899 | const char *id, *model, *name; | 899 | const char *id, *model, *name; |
900 | unsigned int *num; | 900 | const unsigned int *num; |
901 | 901 | ||
902 | rootdn = find_path_device("/"); | 902 | rootdn = of_find_node_by_path("/"); |
903 | if (!rootdn) | 903 | if (!rootdn) |
904 | return -ENOENT; | 904 | return -ENOENT; |
905 | 905 | ||
@@ -912,10 +912,11 @@ static int get_system_info(void) | |||
912 | if (name) | 912 | if (name) |
913 | strncpy(partition_name, name, sizeof(partition_name)); | 913 | strncpy(partition_name, name, sizeof(partition_name)); |
914 | 914 | ||
915 | num = (unsigned int *) get_property(rootdn, "ibm,partition-no", NULL); | 915 | num = get_property(rootdn, "ibm,partition-no", NULL); |
916 | if (num) | 916 | if (num) |
917 | partition_number = *num; | 917 | partition_number = *num; |
918 | 918 | ||
919 | of_node_put(rootdn); | ||
919 | return 0; | 920 | return 0; |
920 | } | 921 | } |
921 | 922 | ||