drivers: random: Reduce preempt disabled region
No need to keep preemption disabled across the whole function. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
5627fb89dd
commit
bb1b83f65d
|
@ -772,8 +772,6 @@ static void add_timer_randomness(struct timer_rand_state *state, unsigned num)
|
|||
} sample;
|
||||
long delta, delta2, delta3;
|
||||
|
||||
preempt_disable();
|
||||
|
||||
sample.jiffies = jiffies;
|
||||
sample.cycles = random_get_entropy();
|
||||
sample.num = num;
|
||||
|
@ -814,7 +812,6 @@ static void add_timer_randomness(struct timer_rand_state *state, unsigned num)
|
|||
*/
|
||||
credit_entropy_bits(r, min_t(int, fls(delta>>1), 11));
|
||||
}
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
void add_input_randomness(unsigned int type, unsigned int code,
|
||||
|
|
Loading…
Reference in New Issue