Commit df1e9791 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Herbert Xu

hwrng: core - remove (un)register_miscdev()

These functions are redundant after commit 0daa7a0a ("hwrng: Avoid
manual device_create_file() calls").

Let's call misc_(de)register() directly.
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent fe69b772
......@@ -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() */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment