diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2006-07-12 01:40:51 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-07-31 01:55:05 -0400 |
commit | 294ef16a2ee34d0d94aa63616f7552d3bc66c982 (patch) | |
tree | fd41d15117e97a756566a040ca9833e76ea8e525 /drivers/scsi/ibmvscsi/rpa_vscsi.c | |
parent | b04e3dd4ab4c7763a4ca8f751caaf69ce8dabbba (diff) |
[POWERPC] scsi: Constify & voidify get_property()
Now that get_property() returns a void *, there's no need to cast its
return value. Also, treat the return value as const, so we can
constify get_property later.
powerpc-specific scsi driver changes.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/scsi/ibmvscsi/rpa_vscsi.c')
-rw-r--r-- | drivers/scsi/ibmvscsi/rpa_vscsi.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/scsi/ibmvscsi/rpa_vscsi.c b/drivers/scsi/ibmvscsi/rpa_vscsi.c index 242b8873b333..cafef9cbbe2e 100644 --- a/drivers/scsi/ibmvscsi/rpa_vscsi.c +++ b/drivers/scsi/ibmvscsi/rpa_vscsi.c | |||
@@ -156,8 +156,8 @@ static void gather_partition_info(void) | |||
156 | { | 156 | { |
157 | struct device_node *rootdn; | 157 | struct device_node *rootdn; |
158 | 158 | ||
159 | char *ppartition_name; | 159 | const char *ppartition_name; |
160 | unsigned int *p_number_ptr; | 160 | const unsigned int *p_number_ptr; |
161 | 161 | ||
162 | /* Retrieve information about this partition */ | 162 | /* Retrieve information about this partition */ |
163 | rootdn = find_path_device("/"); | 163 | rootdn = find_path_device("/"); |
@@ -165,14 +165,11 @@ static void gather_partition_info(void) | |||
165 | return; | 165 | return; |
166 | } | 166 | } |
167 | 167 | ||
168 | ppartition_name = | 168 | ppartition_name = get_property(rootdn, "ibm,partition-name", NULL); |
169 | get_property(rootdn, "ibm,partition-name", NULL); | ||
170 | if (ppartition_name) | 169 | if (ppartition_name) |
171 | strncpy(partition_name, ppartition_name, | 170 | strncpy(partition_name, ppartition_name, |
172 | sizeof(partition_name)); | 171 | sizeof(partition_name)); |
173 | p_number_ptr = | 172 | p_number_ptr = get_property(rootdn, "ibm,partition-no", NULL); |
174 | (unsigned int *)get_property(rootdn, "ibm,partition-no", | ||
175 | NULL); | ||
176 | if (p_number_ptr) | 173 | if (p_number_ptr) |
177 | partition_number = *p_number_ptr; | 174 | partition_number = *p_number_ptr; |
178 | } | 175 | } |