mirror of
https://github.com/hardkernel/linux.git
synced 2026-05-30 07:46:36 +09:00
virtio-rng: support multiple virtio-rng devices
Current hwrng core supports to register multiple hwrng devices, and there is only one device really works in the same time. QEMU alsu supports to have multiple virtio-rng backends. This patch changes virtio-rng driver to support multiple virtio-rng devices. ]# cat /sys/class/misc/hw_random/rng_available virtio_rng.0 virtio_rng.1 ]# cat /sys/class/misc/hw_random/rng_current virtio_rng.0 ]# echo -n virtio_rng.1 > /sys/class/misc/hw_random/rng_current ]# dd if=/dev/hwrng of=/dev/null Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
* @priv: Private data, for use by the RNG driver.
|
||||
*/
|
||||
struct hwrng {
|
||||
const char *name;
|
||||
char *name;
|
||||
int (*init)(struct hwrng *rng);
|
||||
void (*cleanup)(struct hwrng *rng);
|
||||
int (*data_present)(struct hwrng *rng, int wait);
|
||||
|
||||
Reference in New Issue
Block a user