Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71196
b: refs/heads/master
c: ac6aec2
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Slaby authored and Linus Torvalds committed Oct 18, 2007
1 parent 445f94b commit ffab763
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8cf5a8c5729116d0d60815393ec9f1c0f0bc2df7
refs/heads/master: ac6aec2f5683588361ab408cb3346b08c66bdfbe
14 changes: 9 additions & 5 deletions trunk/drivers/char/rocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,8 @@ static void init_r_port(int board, int aiop, int chan, struct pci_dev *pci_dev)
spin_lock_init(&info->slock);
mutex_init(&info->write_mtx);
rp_table[line] = info;
if (pci_dev)
tty_register_device(rocket_driver, line, &pci_dev->dev);
tty_register_device(rocket_driver, line, pci_dev ? &pci_dev->dev :
NULL);
}

/*
Expand Down Expand Up @@ -2438,7 +2438,7 @@ static int __init rp_init(void)
rocket_driver->init_termios.c_ispeed = 9600;
rocket_driver->init_termios.c_ospeed = 9600;
#ifdef ROCKET_SOFT_FLOW
rocket_driver->flags |= TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
rocket_driver->flags |= TTY_DRIVER_REAL_RAW;
#endif
tty_set_operations(rocket_driver, &rocket_ops);

Expand Down Expand Up @@ -2495,10 +2495,14 @@ static void rp_cleanup_module(void)
if (retval)
printk(KERN_INFO "Error %d while trying to unregister "
"rocketport driver\n", -retval);
put_tty_driver(rocket_driver);

for (i = 0; i < MAX_RP_PORTS; i++)
kfree(rp_table[i]);
if (rp_table[i]) {
tty_unregister_device(rocket_driver, i);
kfree(rp_table[i]);
}

put_tty_driver(rocket_driver);

for (i = 0; i < NUM_BOARDS; i++) {
if (rcktpt_io_addr[i] <= 0 || is_PCI[i])
Expand Down

0 comments on commit ffab763

Please sign in to comment.