diff options
| author | Sasha Levin <sasha.levin@oracle.com> | 2014-05-16 11:42:43 +0930 |
|---|---|---|
| committer | Rusty Russell <rusty@rustcorp.com.au> | 2014-05-19 09:26:40 +0930 |
| commit | a17597d3b418ca5a394d14724ccfc295cb3186c8 (patch) | |
| tree | a2421dacd4bef70854f146bdaf01eb6305160338 /include | |
| parent | e5d23a8cc38c555f9f3a40dcc5d14030105df9a8 (diff) | |
virtio-rng: fixes for device registration/unregistration
There are several fixes in this patch (mostly because it's hard
splitting them up):
- Revert the name field in struct hwrng back to 'const'. Also, don't
do an extra kmalloc for the name - just wasteful.
- Deal with allocation failures properly.
- Use IDA to allocate device number instead of brute forcing one.
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/hw_random.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/hw_random.h b/include/linux/hw_random.h index 02d9c87be54..b4b0eef5fdd 100644 --- a/include/linux/hw_random.h +++ b/include/linux/hw_random.h @@ -31,7 +31,7 @@ * @priv: Private data, for use by the RNG driver. */ struct hwrng { - char *name; + const char *name; int (*init)(struct hwrng *rng); void (*cleanup)(struct hwrng *rng); int (*data_present)(struct hwrng *rng, int wait); |
