[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>
此提交包含在:
@@ -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;
|
||||
|
||||
|
新增問題並參考
封鎖使用者