diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-10-30 03:20:56 -0400 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-10-30 03:20:56 -0400 |
| commit | 53279f36dccffc26ff536003fd6bb97cc21c3b82 (patch) | |
| tree | 9d16e497c0e4158c7c054c479bd0e9ff0388d7bb /include/linux/random.h | |
| parent | a6e8c0a25377e27958b11b20e1927885ae7c9857 (diff) | |
| parent | 8f0d8163b50e01f398b14bcd4dc039ac5ab18d64 (diff) | |
Merge tag 'v3.7-rc3' into next to sync up with recent USB and MFD changes
Diffstat (limited to 'include/linux/random.h')
| -rw-r--r-- | include/linux/random.h | 43 |
1 files changed, 1 insertions, 42 deletions
diff --git a/include/linux/random.h b/include/linux/random.h index ac621ce886ca..6330ed47b38b 100644 --- a/include/linux/random.h +++ b/include/linux/random.h | |||
| @@ -3,50 +3,11 @@ | |||
| 3 | * | 3 | * |
| 4 | * Include file for the random number generator. | 4 | * Include file for the random number generator. |
| 5 | */ | 5 | */ |
| 6 | |||
| 7 | #ifndef _LINUX_RANDOM_H | 6 | #ifndef _LINUX_RANDOM_H |
| 8 | #define _LINUX_RANDOM_H | 7 | #define _LINUX_RANDOM_H |
| 9 | 8 | ||
| 10 | #include <linux/types.h> | 9 | #include <uapi/linux/random.h> |
| 11 | #include <linux/ioctl.h> | ||
| 12 | #include <linux/irqnr.h> | ||
| 13 | |||
| 14 | /* ioctl()'s for the random number generator */ | ||
| 15 | |||
| 16 | /* Get the entropy count. */ | ||
| 17 | #define RNDGETENTCNT _IOR( 'R', 0x00, int ) | ||
| 18 | |||
| 19 | /* Add to (or subtract from) the entropy count. (Superuser only.) */ | ||
| 20 | #define RNDADDTOENTCNT _IOW( 'R', 0x01, int ) | ||
| 21 | |||
| 22 | /* Get the contents of the entropy pool. (Superuser only.) */ | ||
| 23 | #define RNDGETPOOL _IOR( 'R', 0x02, int [2] ) | ||
| 24 | |||
| 25 | /* | ||
| 26 | * Write bytes into the entropy pool and add to the entropy count. | ||
| 27 | * (Superuser only.) | ||
| 28 | */ | ||
| 29 | #define RNDADDENTROPY _IOW( 'R', 0x03, int [2] ) | ||
| 30 | 10 | ||
| 31 | /* Clear entropy count to 0. (Superuser only.) */ | ||
| 32 | #define RNDZAPENTCNT _IO( 'R', 0x04 ) | ||
| 33 | |||
| 34 | /* Clear the entropy pool and associated counters. (Superuser only.) */ | ||
| 35 | #define RNDCLEARPOOL _IO( 'R', 0x06 ) | ||
| 36 | |||
| 37 | struct rand_pool_info { | ||
| 38 | int entropy_count; | ||
| 39 | int buf_size; | ||
| 40 | __u32 buf[0]; | ||
| 41 | }; | ||
| 42 | |||
| 43 | struct rnd_state { | ||
| 44 | __u32 s1, s2, s3; | ||
| 45 | }; | ||
| 46 | |||
| 47 | /* Exported functions */ | ||
| 48 | |||
| 49 | #ifdef __KERNEL__ | ||
| 50 | 11 | ||
| 51 | extern void add_device_randomness(const void *, unsigned int); | 12 | extern void add_device_randomness(const void *, unsigned int); |
| 52 | extern void add_input_randomness(unsigned int type, unsigned int code, | 13 | extern void add_input_randomness(unsigned int type, unsigned int code, |
| @@ -104,6 +65,4 @@ static inline int arch_get_random_int(unsigned int *v) | |||
| 104 | } | 65 | } |
| 105 | #endif | 66 | #endif |
| 106 | 67 | ||
| 107 | #endif /* __KERNEL___ */ | ||
| 108 | |||
| 109 | #endif /* _LINUX_RANDOM_H */ | 68 | #endif /* _LINUX_RANDOM_H */ |
