random: handle archrandom with multiple longs
[linux-2.6-microblaze.git] / arch / powerpc / include / asm / archrandom.h
index 25ba65d..0e365c5 100644 (file)
@@ -4,34 +4,16 @@
 
 #include <asm/machdep.h>
 
-static inline bool __must_check arch_get_random_long(unsigned long *v)
+static inline size_t __must_check arch_get_random_longs(unsigned long *v, size_t max_longs)
 {
-       return false;
+       return 0;
 }
 
-static inline bool __must_check arch_get_random_int(unsigned int *v)
+static inline size_t __must_check arch_get_random_seed_longs(unsigned long *v, size_t max_longs)
 {
-       return false;
-}
-
-static inline bool __must_check arch_get_random_seed_long(unsigned long *v)
-{
-       if (ppc_md.get_random_seed)
-               return ppc_md.get_random_seed(v);
-
-       return false;
-}
-
-static inline bool __must_check arch_get_random_seed_int(unsigned int *v)
-{
-       unsigned long val;
-       bool rc;
-
-       rc = arch_get_random_seed_long(&val);
-       if (rc)
-               *v = val;
-
-       return rc;
+       if (max_longs && ppc_md.get_random_seed && ppc_md.get_random_seed(v))
+               return 1;
+       return 0;
 }
 
 #ifdef CONFIG_PPC_POWERNV