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:
Ingo Molnar 2009-07-03 08:29:30 -05:00 committed by Alibek Omarov
parent 5627fb89dd
commit bb1b83f65d
1 changed files with 0 additions and 3 deletions

View File

@ -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,