diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2013-01-28 22:34:41 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-29 23:28:45 -0500 |
commit | 84472c3b584db1fcd4cb8a434468696bbf8640d8 (patch) | |
tree | 6af50c874e167bf0980982c86605021ad26ba5e9 | |
parent | 4df5bb0464769a07ce6d6a265174477786512f2e (diff) |
staging/fwserial: Don't use deprecated alloc_tty_driver()
Use tty_alloc_driver() instead.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/fwserial/fwserial.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c index 37b082be9d24..258ac35fb5af 100644 --- a/drivers/staging/fwserial/fwserial.c +++ b/drivers/staging/fwserial/fwserial.c | |||
@@ -2891,9 +2891,10 @@ static int __init fwserial_init(void) | |||
2891 | num_ttys = MAX_CARD_PORTS - num_loops; | 2891 | num_ttys = MAX_CARD_PORTS - num_loops; |
2892 | num_ports = num_ttys + num_loops; | 2892 | num_ports = num_ttys + num_loops; |
2893 | 2893 | ||
2894 | fwtty_driver = alloc_tty_driver(MAX_TOTAL_PORTS); | 2894 | fwtty_driver = tty_alloc_driver(MAX_TOTAL_PORTS, TTY_DRIVER_REAL_RAW |
2895 | if (!fwtty_driver) { | 2895 | | TTY_DRIVER_DYNAMIC_DEV); |
2896 | err = -ENOMEM; | 2896 | if (IS_ERR(fwtty_driver)) { |
2897 | err = PTR_ERR(fwtty_driver); | ||
2897 | return err; | 2898 | return err; |
2898 | } | 2899 | } |
2899 | 2900 | ||
@@ -2903,9 +2904,6 @@ static int __init fwserial_init(void) | |||
2903 | fwtty_driver->minor_start = 0; | 2904 | fwtty_driver->minor_start = 0; |
2904 | fwtty_driver->type = TTY_DRIVER_TYPE_SERIAL; | 2905 | fwtty_driver->type = TTY_DRIVER_TYPE_SERIAL; |
2905 | fwtty_driver->subtype = SERIAL_TYPE_NORMAL; | 2906 | fwtty_driver->subtype = SERIAL_TYPE_NORMAL; |
2906 | fwtty_driver->flags = TTY_DRIVER_REAL_RAW | | ||
2907 | TTY_DRIVER_DYNAMIC_DEV; | ||
2908 | |||
2909 | fwtty_driver->init_termios = tty_std_termios; | 2907 | fwtty_driver->init_termios = tty_std_termios; |
2910 | fwtty_driver->init_termios.c_cflag |= CLOCAL; | 2908 | fwtty_driver->init_termios.c_cflag |= CLOCAL; |
2911 | tty_set_operations(fwtty_driver, &fwtty_ops); | 2909 | tty_set_operations(fwtty_driver, &fwtty_ops); |
@@ -2917,9 +2915,11 @@ static int __init fwserial_init(void) | |||
2917 | } | 2915 | } |
2918 | 2916 | ||
2919 | if (create_loop_dev) { | 2917 | if (create_loop_dev) { |
2920 | fwloop_driver = alloc_tty_driver(MAX_TOTAL_PORTS / num_ports); | 2918 | fwloop_driver = tty_alloc_driver(MAX_TOTAL_PORTS / num_ports, |
2921 | if (!fwloop_driver) { | 2919 | TTY_DRIVER_REAL_RAW |
2922 | err = -ENOMEM; | 2920 | | TTY_DRIVER_DYNAMIC_DEV); |
2921 | if (IS_ERR(fwloop_driver)) { | ||
2922 | err = PTR_ERR(fwloop_driver); | ||
2923 | goto unregister_driver; | 2923 | goto unregister_driver; |
2924 | } | 2924 | } |
2925 | 2925 | ||
@@ -2929,9 +2929,6 @@ static int __init fwserial_init(void) | |||
2929 | fwloop_driver->minor_start = 0; | 2929 | fwloop_driver->minor_start = 0; |
2930 | fwloop_driver->type = TTY_DRIVER_TYPE_SERIAL; | 2930 | fwloop_driver->type = TTY_DRIVER_TYPE_SERIAL; |
2931 | fwloop_driver->subtype = SERIAL_TYPE_NORMAL; | 2931 | fwloop_driver->subtype = SERIAL_TYPE_NORMAL; |
2932 | fwloop_driver->flags = TTY_DRIVER_REAL_RAW | | ||
2933 | TTY_DRIVER_DYNAMIC_DEV; | ||
2934 | |||
2935 | fwloop_driver->init_termios = tty_std_termios; | 2932 | fwloop_driver->init_termios = tty_std_termios; |
2936 | fwloop_driver->init_termios.c_cflag |= CLOCAL; | 2933 | fwloop_driver->init_termios.c_cflag |= CLOCAL; |
2937 | tty_set_operations(fwloop_driver, &fwloop_ops); | 2934 | tty_set_operations(fwloop_driver, &fwloop_ops); |