Skip to content

Commit

Permalink
tiny_tty: cleanup so module can be loaded & rm'd
Browse files Browse the repository at this point in the history
this change allowed my to `insmod` and `rmmod` the same driver over and over, otherwise I would get a 'driver already defined' error
  • Loading branch information
illegalprime authored and dwalkes committed May 13, 2022
1 parent a81106a commit 718cbdf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tty/tiny_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,8 +551,10 @@ static void __exit tiny_exit(void)
struct tiny_serial *tiny;
int i;

for (i = 0; i < TINY_TTY_MINORS; ++i)
for (i = 0; i < TINY_TTY_MINORS; ++i) {
tty_unregister_device(tiny_tty_driver, i);
tty_port_destroy(tiny_tty_port + i);
}
tty_unregister_driver(tiny_tty_driver);

/* shut down all of the timers and free the memory */
Expand Down

0 comments on commit 718cbdf

Please sign in to comment.