Skip to content

Commit

Permalink
MIPS: APRP: Unregister rtlx interrupt hook at module exit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dczhu authored and ralfbaechle committed Mar 6, 2014
1 parent 9c1f6e0 commit eee5794
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/mips/kernel/rtlx-cmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
3 changes: 3 additions & 0 deletions arch/mips/kernel/rtlx-mt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit eee5794

Please sign in to comment.