[POWERPC] chrp: 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.

chrp platform changes.

Built for chrp32_defconfig

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
此提交包含在:
Jeremy Kerr
2006-07-12 15:40:05 +10:00
提交者 Paul Mackerras
父節點 c61c27d58a
當前提交 ae6b4101e5
共有 3 個檔案被更改,包括 17 行新增20 行删除

查看文件

@@ -67,13 +67,14 @@ static void chrp_nvram_write(int addr, unsigned char val)
void __init chrp_nvram_init(void)
{
struct device_node *nvram;
unsigned int *nbytes_p, proplen;
const unsigned int *nbytes_p;
unsigned int proplen;
nvram = of_find_node_by_type(NULL, "nvram");
if (nvram == NULL)
return;
nbytes_p = (unsigned int *)get_property(nvram, "#bytes", &proplen);
nbytes_p = get_property(nvram, "#bytes", &proplen);
if (nbytes_p == NULL || proplen != sizeof(unsigned int))
return;