summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/loongson64/common/serial.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/mips/loongson64/common/serial.c b/arch/mips/loongson64/common/serial.c
index c23fa1373729..ffefc1cb2612 100644
--- a/arch/mips/loongson64/common/serial.c
+++ b/arch/mips/loongson64/common/serial.c
@@ -11,7 +11,7 @@
*/
#include <linux/io.h>
-#include <linux/init.h>
+#include <linux/module.h>
#include <linux/serial_8250.h>
#include <asm/bootinfo.h>
@@ -108,5 +108,10 @@ static int __init serial_init(void)
return platform_device_register(&uart8250_device);
}
+module_init(serial_init);
-device_initcall(serial_init);
+static void __init serial_exit(void)
+{
+ platform_device_unregister(&uart8250_device);
+}
+module_exit(serial_exit);