Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354287
b: refs/heads/master
c: 84472c3
h: refs/heads/master
i:
  354285: 52346c4
  354283: 0081baf
  354279: d6fa005
  354271: e52b6ec
v: v3
  • Loading branch information
Peter Hurley authored and Greg Kroah-Hartman committed Jan 30, 2013
1 parent 7e538e3 commit c20d41a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 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: 4df5bb0464769a07ce6d6a265174477786512f2e
refs/heads/master: 84472c3b584db1fcd4cb8a434468696bbf8640d8
21 changes: 9 additions & 12 deletions trunk/drivers/staging/fwserial/fwserial.c
Original file line number Diff line number Diff line change
Expand Up @@ -2891,9 +2891,10 @@ static int __init fwserial_init(void)
num_ttys = MAX_CARD_PORTS - num_loops;
num_ports = num_ttys + num_loops;

fwtty_driver = alloc_tty_driver(MAX_TOTAL_PORTS);
if (!fwtty_driver) {
err = -ENOMEM;
fwtty_driver = tty_alloc_driver(MAX_TOTAL_PORTS, TTY_DRIVER_REAL_RAW
| TTY_DRIVER_DYNAMIC_DEV);
if (IS_ERR(fwtty_driver)) {
err = PTR_ERR(fwtty_driver);
return err;
}

Expand All @@ -2903,9 +2904,6 @@ static int __init fwserial_init(void)
fwtty_driver->minor_start = 0;
fwtty_driver->type = TTY_DRIVER_TYPE_SERIAL;
fwtty_driver->subtype = SERIAL_TYPE_NORMAL;
fwtty_driver->flags = TTY_DRIVER_REAL_RAW |
TTY_DRIVER_DYNAMIC_DEV;

fwtty_driver->init_termios = tty_std_termios;
fwtty_driver->init_termios.c_cflag |= CLOCAL;
tty_set_operations(fwtty_driver, &fwtty_ops);
Expand All @@ -2917,9 +2915,11 @@ static int __init fwserial_init(void)
}

if (create_loop_dev) {
fwloop_driver = alloc_tty_driver(MAX_TOTAL_PORTS / num_ports);
if (!fwloop_driver) {
err = -ENOMEM;
fwloop_driver = tty_alloc_driver(MAX_TOTAL_PORTS / num_ports,
TTY_DRIVER_REAL_RAW
| TTY_DRIVER_DYNAMIC_DEV);
if (IS_ERR(fwloop_driver)) {
err = PTR_ERR(fwloop_driver);
goto unregister_driver;
}

Expand All @@ -2929,9 +2929,6 @@ static int __init fwserial_init(void)
fwloop_driver->minor_start = 0;
fwloop_driver->type = TTY_DRIVER_TYPE_SERIAL;
fwloop_driver->subtype = SERIAL_TYPE_NORMAL;
fwloop_driver->flags = TTY_DRIVER_REAL_RAW |
TTY_DRIVER_DYNAMIC_DEV;

fwloop_driver->init_termios = tty_std_termios;
fwloop_driver->init_termios.c_cflag |= CLOCAL;
tty_set_operations(fwloop_driver, &fwloop_ops);
Expand Down

0 comments on commit c20d41a

Please sign in to comment.