hwrng: use rng source with best quality
authorHarald Freudenberger <freude@linux.vnet.ibm.com>
Tue, 11 Jul 2017 07:36:22 +0000 (09:36 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 18 Jul 2017 10:16:08 +0000 (18:16 +0800)
commit2bbb6983887fefc8026beab01198d30f47b7bd22
treedfc46deced14f60193d7a04a13870d768f2a8c1b
parentad818080f69cbf064649d423e27af606c65e53ba
hwrng: use rng source with best quality

This patch rewoks the hwrng to always use the
rng source with best entropy quality.

On registation and unregistration the hwrng now
tries to choose the best (= highest quality value)
rng source. The handling of the internal list
of registered rng sources is now always sorted
by quality and the top most rng chosen.

Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com>
Reviewed-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/core.c