]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/random.h
Merge tag 'sound-fix2-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[karo-tx-linux.git] / include / linux / random.h
index 6312dd9ba449b4d65f5bb6bcdc01d606fc2fdfa8..4002b3df4c8566d4497a9dae222e6fc1e6e37b66 100644 (file)
@@ -29,8 +29,13 @@ unsigned long randomize_range(unsigned long start, unsigned long end, unsigned l
 u32 prandom_u32(void);
 void prandom_bytes(void *buf, int nbytes);
 void prandom_seed(u32 seed);
+void prandom_reseed_late(void);
 
-u32 prandom_u32_state(struct rnd_state *);
+struct rnd_state {
+       __u32 s1, s2, s3, s4;
+};
+
+u32 prandom_u32_state(struct rnd_state *state);
 void prandom_bytes_state(struct rnd_state *state, void *buf, int nbytes);
 
 /*
@@ -50,9 +55,10 @@ static inline void prandom_seed_state(struct rnd_state *state, u64 seed)
 {
        u32 i = (seed >> 32) ^ (seed << 10) ^ seed;
 
-       state->s1 = __seed(i, 1);
-       state->s2 = __seed(i, 7);
-       state->s3 = __seed(i, 15);
+       state->s1 = __seed(i,   2U);
+       state->s2 = __seed(i,   8U);
+       state->s3 = __seed(i,  16U);
+       state->s4 = __seed(i, 128U);
 }
 
 #ifdef CONFIG_ARCH_RANDOM