mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-23 22:34:21 +08:00
hwrng: core - remove (un)register_miscdev()
These functions are redundant after commit 0daa7a0afd
("hwrng: Avoid
manual device_create_file() calls").
Let's call misc_(de)register() directly.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
fe69b772e3
commit
df1e979199
@ -486,16 +486,6 @@ static struct attribute *rng_dev_attrs[] = {
|
||||
|
||||
ATTRIBUTE_GROUPS(rng_dev);
|
||||
|
||||
static void __exit unregister_miscdev(void)
|
||||
{
|
||||
misc_deregister(&rng_miscdev);
|
||||
}
|
||||
|
||||
static int __init register_miscdev(void)
|
||||
{
|
||||
return misc_register(&rng_miscdev);
|
||||
}
|
||||
|
||||
static int hwrng_fillfn(void *unused)
|
||||
{
|
||||
size_t entropy, entropy_credit = 0; /* in 1/1024 of a bit */
|
||||
@ -709,7 +699,7 @@ static int __init hwrng_modinit(void)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
ret = register_miscdev();
|
||||
ret = misc_register(&rng_miscdev);
|
||||
if (ret) {
|
||||
kfree(rng_fillbuf);
|
||||
kfree(rng_buffer);
|
||||
@ -726,7 +716,7 @@ static void __exit hwrng_modexit(void)
|
||||
kfree(rng_fillbuf);
|
||||
mutex_unlock(&rng_mutex);
|
||||
|
||||
unregister_miscdev();
|
||||
misc_deregister(&rng_miscdev);
|
||||
}
|
||||
|
||||
fs_initcall(hwrng_modinit); /* depends on misc_register() */
|
||||
|
Loading…
Reference in New Issue
Block a user