[patch 04/59] Fix HWRNG built-in initcalls priority

Chris Wright
2007-02-03T02:35:46Z

[-- Attachment #1: fix-hwrng-built-in-initcalls-priority.patch --]
[-- Type: text/plain, Size: 2397 bytes --]

-stable review patch. If anyone has any objections, please let us know.
------------------

From: Michael Buesch <mb@bu3sch.de>

This changes all HWRNG driver initcalls to module_init().
We must probe the RNGs after the major kernel subsystems
are already up and running (like PCI).
This fixes Bug 7730.
http://bugzilla.kernel.org/show_bug.cgi?id=7730

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
drivers/char/hw_random/amd-rng.c | 2 +-
drivers/char/hw_random/geode-rng.c | 2 +-
drivers/char/hw_random/intel-rng.c | 2 +-
drivers/char/hw_random/ixp4xx-rng.c | 2 +-
drivers/char/hw_random/via-rng.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)

--- linux-2.6.19.2.orig/drivers/char/hw_random/amd-rng.c
+++ linux-2.6.19.2/drivers/char/hw_random/amd-rng.c
@@ -144,7 +144,7 @@ static void __exit mod_exit(void)
hwrng_unregister(&amd_rng);
}

-subsys_initcall(mod_init);
+module_init(mod_init);
module_exit(mod_exit);

MODULE_AUTHOR("The Linux Kernel team");
--- linux-2.6.19.2.orig/drivers/char/hw_random/geode-rng.c
+++ linux-2.6.19.2/drivers/char/hw_random/geode-rng.c
@@ -125,7 +125,7 @@ static void __exit mod_exit(void)
iounmap(mem);
}

-subsys_initcall(mod_init);
+module_init(mod_init);
module_exit(mod_exit);

MODULE_DESCRIPTION("H/W RNG driver for AMD Geode LX CPUs");
--- linux-2.6.19.2.orig/drivers/char/hw_random/intel-rng.c
+++ linux-2.6.19.2/drivers/char/hw_random/intel-rng.c
@@ -350,7 +350,7 @@ static void __exit mod_exit(void)
iounmap(mem);
}

-subsys_initcall(mod_init);
+module_init(mod_init);
module_exit(mod_exit);

MODULE_DESCRIPTION("H/W RNG driver for Intel chipsets");
--- linux-2.6.19.2.orig/drivers/char/hw_random/ixp4xx-rng.c
+++ linux-2.6.19.2/drivers/char/hw_random/ixp4xx-rng.c
@@ -64,7 +64,7 @@ static void __exit ixp4xx_rng_exit(void)
iounmap(rng_base);
}

-subsys_initcall(ixp4xx_rng_init);
+module_init(ixp4xx_rng_init);
module_exit(ixp4xx_rng_exit);

MODULE_AUTHOR("Deepak Saxena <dsaxena@plexity.net>");
--- linux-2.6.19.2.orig/drivers/char/hw_random/via-rng.c
+++ linux-2.6.19.2/drivers/char/hw_random/via-rng.c
@@ -176,7 +176,7 @@ static void __exit mod_exit(void)
hwrng_unregister(&via_rng);
}

-subsys_initcall(mod_init);
+module_init(mod_init);
module_exit(mod_exit);

MODULE_DESCRIPTION("H/W RNG driver for VIA chipsets");

--