[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>
This commit is contained in:
Jeremy Kerr
2006-07-12 15:40:51 +10:00
committed by Paul Mackerras
parent b04e3dd4ab
commit 294ef16a2e
3 changed files with 8 additions and 10 deletions

View File

@@ -156,8 +156,8 @@ static void gather_partition_info(void)
{
struct device_node *rootdn;
char *ppartition_name;
unsigned int *p_number_ptr;
const char *ppartition_name;
const unsigned int *p_number_ptr;
/* Retrieve information about this partition */
rootdn = find_path_device("/");
@@ -165,14 +165,11 @@ static void gather_partition_info(void)
return;
}
ppartition_name =
get_property(rootdn, "ibm,partition-name", NULL);
ppartition_name = get_property(rootdn, "ibm,partition-name", NULL);
if (ppartition_name)
strncpy(partition_name, ppartition_name,
sizeof(partition_name));
p_number_ptr =
(unsigned int *)get_property(rootdn, "ibm,partition-no",
NULL);
p_number_ptr = get_property(rootdn, "ibm,partition-no", NULL);
if (p_number_ptr)
partition_number = *p_number_ptr;
}