diff options
author | Deng-Cheng Zhu <dengcheng.zhu@imgtec.com> | 2014-02-28 10:23:02 -0800 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-03-06 20:55:07 +0100 |
commit | eee5794881d50e8ac3a56c74d3131f2364f200b9 (patch) | |
tree | 5a4d14461850821b6756e1c5dcd4216c90f5a072 /arch/mips | |
parent | 9c1f6e008297e184a7f701f2f03c9269011fd049 (diff) |
MIPS: APRP: Unregister rtlx interrupt hook at module exit
If the aprp_hook is not assigned back to NULL, it will still be called
after module exits. This is not wanted.
Reviewed-by: Steven J. Hill <Steven.Hill@imgtec.com>
Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: john@phrozen.org
Patchwork: https://patchwork.linux-mips.org/patch/6590/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/kernel/rtlx-cmp.c | 3 | ||||
-rw-r--r-- | arch/mips/kernel/rtlx-mt.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/arch/mips/kernel/rtlx-cmp.c b/arch/mips/kernel/rtlx-cmp.c index 56dc69635153..758fb3cd2326 100644 --- a/arch/mips/kernel/rtlx-cmp.c +++ b/arch/mips/kernel/rtlx-cmp.c @@ -112,5 +112,8 @@ void __exit rtlx_module_exit(void) for (i = 0; i < RTLX_CHANNELS; i++) device_destroy(mt_class, MKDEV(major, i)); + unregister_chrdev(major, RTLX_MODULE_NAME); + + aprp_hook = NULL; } diff --git a/arch/mips/kernel/rtlx-mt.c b/arch/mips/kernel/rtlx-mt.c index 91d61ba422b4..9c1aca00fd54 100644 --- a/arch/mips/kernel/rtlx-mt.c +++ b/arch/mips/kernel/rtlx-mt.c @@ -144,5 +144,8 @@ void __exit rtlx_module_exit(void) for (i = 0; i < RTLX_CHANNELS; i++) device_destroy(mt_class, MKDEV(major, i)); + unregister_chrdev(major, RTLX_MODULE_NAME); + + aprp_hook = NULL; } |