]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/platforms/chrp/nvram.c
[POWERPC] Rename get_property to of_get_property: arch/powerpc
[karo-tx-linux.git] / arch / powerpc / platforms / chrp / nvram.c
index 65266b46db9b6a0e8da7b822d3739b5e0f10bac2..8efd4244701c2eb1d0a73b07d9e21888ae066e94 100644 (file)
@@ -17,6 +17,7 @@
 #include <asm/uaccess.h>
 #include <asm/prom.h>
 #include <asm/machdep.h>
+#include <asm/rtas.h>
 #include "chrp.h"
 
 static unsigned int nvram_size;
@@ -25,7 +26,8 @@ static DEFINE_SPINLOCK(nvram_lock);
 
 static unsigned char chrp_nvram_read(int addr)
 {
-       unsigned long done, flags;
+       unsigned int done;
+       unsigned long flags;
        unsigned char ret;
 
        if (addr >= nvram_size) {
@@ -46,7 +48,8 @@ static unsigned char chrp_nvram_read(int addr)
 
 static void chrp_nvram_write(int addr, unsigned char val)
 {
-       unsigned long done, flags;
+       unsigned int done;
+       unsigned long flags;
 
        if (addr >= nvram_size) {
                printk(KERN_DEBUG "%s: write addr %d > nvram_size %u\n",
@@ -64,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 = of_get_property(nvram, "#bytes", &proplen);
        if (nbytes_p == NULL || proplen != sizeof(unsigned int))
                return;