Skip to content

Commit c271950

Browse files
committed
random: Remove kernel blocking API
This patch removes the kernel blocking API as it has been completely replaced by the callback API. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 57225e6 commit c271950

2 files changed

Lines changed: 0 additions & 13 deletions

File tree

drivers/char/random.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,18 +1264,6 @@ void get_random_bytes(void *buf, int nbytes)
12641264
}
12651265
EXPORT_SYMBOL(get_random_bytes);
12661266

1267-
/*
1268-
* Equivalent function to get_random_bytes with the difference that this
1269-
* function blocks the request until the nonblocking_pool is initialized.
1270-
*/
1271-
void get_blocking_random_bytes(void *buf, int nbytes)
1272-
{
1273-
if (unlikely(nonblocking_pool.initialized == 0))
1274-
wait_event(urandom_init_wait, nonblocking_pool.initialized);
1275-
extract_entropy(&nonblocking_pool, buf, nbytes, 0, 0);
1276-
}
1277-
EXPORT_SYMBOL(get_blocking_random_bytes);
1278-
12791267
/*
12801268
* Add a callback function that will be invoked when the nonblocking
12811269
* pool is initialised.

include/linux/random.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ extern void add_input_randomness(unsigned int type, unsigned int code,
2121
extern void add_interrupt_randomness(int irq, int irq_flags);
2222

2323
extern void get_random_bytes(void *buf, int nbytes);
24-
extern void get_blocking_random_bytes(void *buf, int nbytes);
2524
extern int add_random_ready_callback(struct random_ready_callback *rdy);
2625
extern void del_random_ready_callback(struct random_ready_callback *rdy);
2726
extern void get_random_bytes_arch(void *buf, int nbytes);

0 commit comments

Comments
 (0)