From: Peter Hurley <peter@hurleysoftware.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux1394-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org,
Stefan Richter <stefanr@s5r6.in-berlin.de>,
Peter Hurley <peter@hurleysoftware.com>
Subject: [PATCH 07/11] staging/fwserial: Don't use deprecated alloc_tty_driver()
Date: Mon, 28 Jan 2013 22:34:41 -0500 [thread overview]
Message-ID: <1359430485-5301-7-git-send-email-peter@hurleysoftware.com> (raw)
In-Reply-To: <1359430485-5301-1-git-send-email-peter@hurleysoftware.com>
Use tty_alloc_driver() instead.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
---
drivers/staging/fwserial/fwserial.c | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c
index 66463d1..912b17a 100644
--- a/drivers/staging/fwserial/fwserial.c
+++ b/drivers/staging/fwserial/fwserial.c
@@ -2882,9 +2882,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;
}
@@ -2894,9 +2895,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);
@@ -2908,9 +2906,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;
}
@@ -2920,9 +2920,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);
--
1.8.1.1
next prev parent reply other threads:[~2013-01-29 3:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-29 3:34 [PATCH 01/11] staging/fwserial: Only reset port status for attached peers Peter Hurley
2013-01-29 3:34 ` [PATCH 02/11] staging/fwserial: Release port regardless of unplug response code Peter Hurley
2013-01-29 3:34 ` [PATCH 03/11] staging/fwserial: Fix sparse build warnings Peter Hurley
2013-01-29 3:34 ` [PATCH 04/11] staging/fwserial: Create loop device the 'tty' way Peter Hurley
2013-01-29 3:34 ` [PATCH 05/11] staging/fwserial: Cleanup /proc/tty/driver/ file Peter Hurley
2013-01-29 3:34 ` [PATCH 06/11] staging/fwserial: Factor unstable stats/debug/status info to debugfs Peter Hurley
2013-01-29 3:34 ` Peter Hurley [this message]
2013-01-29 3:34 ` [PATCH 08/11] staging/fwserial: Remove reference to removed constant Peter Hurley
2013-01-29 3:34 ` [PATCH 09/11] staging/fwserial: add diagnostic for buffer overflow Peter Hurley
2013-01-29 3:34 ` [PATCH 10/11] staging/fwserial: Fix premature unthrottle Peter Hurley
2013-01-30 4:29 ` Greg Kroah-Hartman
2013-01-30 13:11 ` Peter Hurley
2013-01-30 13:32 ` Greg Kroah-Hartman
2013-01-30 13:37 ` Peter Hurley
2013-01-30 16:25 ` Greg Kroah-Hartman
2013-01-29 3:34 ` [PATCH 11/11] staging/fwserial: Remove unneeded push work Peter Hurley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1359430485-5301-7-git-send-email-peter@hurleysoftware.com \
--to=peter@hurleysoftware.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=stefanr@s5r6.in-berlin.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.