diff options
Diffstat (limited to 'arch/um/drivers/random.c')
-rw-r--r-- | arch/um/drivers/random.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c index 37c51a6be690..778a0e52d5a5 100644 --- a/arch/um/drivers/random.c +++ b/arch/um/drivers/random.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/miscdevice.h> | 13 | #include <linux/miscdevice.h> |
14 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
15 | #include <linux/uaccess.h> | 15 | #include <linux/uaccess.h> |
16 | #include <init.h> | ||
16 | #include <irq_kern.h> | 17 | #include <irq_kern.h> |
17 | #include <os.h> | 18 | #include <os.h> |
18 | 19 | ||
@@ -154,7 +155,14 @@ err_out_cleanup_hw: | |||
154 | /* | 155 | /* |
155 | * rng_cleanup - shutdown RNG module | 156 | * rng_cleanup - shutdown RNG module |
156 | */ | 157 | */ |
157 | static void __exit rng_cleanup (void) | 158 | |
159 | static void cleanup(void) | ||
160 | { | ||
161 | free_irq_by_fd(random_fd); | ||
162 | os_close_file(random_fd); | ||
163 | } | ||
164 | |||
165 | static void __exit rng_cleanup(void) | ||
158 | { | 166 | { |
159 | os_close_file(random_fd); | 167 | os_close_file(random_fd); |
160 | misc_deregister (&rng_miscdev); | 168 | misc_deregister (&rng_miscdev); |
@@ -162,6 +170,7 @@ static void __exit rng_cleanup (void) | |||
162 | 170 | ||
163 | module_init (rng_init); | 171 | module_init (rng_init); |
164 | module_exit (rng_cleanup); | 172 | module_exit (rng_cleanup); |
173 | __uml_exitcall(cleanup); | ||
165 | 174 | ||
166 | MODULE_DESCRIPTION("UML Host Random Number Generator (RNG) driver"); | 175 | MODULE_DESCRIPTION("UML Host Random Number Generator (RNG) driver"); |
167 | MODULE_LICENSE("GPL"); | 176 | MODULE_LICENSE("GPL"); |