diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2009-06-11 07:26:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-11 11:50:56 -0400 |
commit | 335f8514f200e63d689113d29cb7253a5c282967 (patch) | |
tree | 11504d090e8e2cd3c1ada3e6765f69f216065d00 /drivers/usb/serial/io_edgeport.c | |
parent | 1ec739be75a6cb961a46ba0b1982d0edb7f27558 (diff) |
tty: Bring the usb tty port structure into more use
This allows us to clean stuff up, but is probably also going to cause
some app breakage with buggy apps as we now implement proper POSIX behaviour
for USB ports matching all the other ports. This does also mean other apps
that break on USB will now work properly.
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/usb/serial/io_edgeport.c')
-rw-r--r-- | drivers/usb/serial/io_edgeport.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c index fb4a73d090f6..53ef5996e33d 100644 --- a/drivers/usb/serial/io_edgeport.c +++ b/drivers/usb/serial/io_edgeport.c | |||
@@ -207,8 +207,7 @@ static void edge_bulk_out_cmd_callback(struct urb *urb); | |||
207 | /* function prototypes for the usbserial callbacks */ | 207 | /* function prototypes for the usbserial callbacks */ |
208 | static int edge_open(struct tty_struct *tty, struct usb_serial_port *port, | 208 | static int edge_open(struct tty_struct *tty, struct usb_serial_port *port, |
209 | struct file *filp); | 209 | struct file *filp); |
210 | static void edge_close(struct tty_struct *tty, struct usb_serial_port *port, | 210 | static void edge_close(struct usb_serial_port *port); |
211 | struct file *filp); | ||
212 | static int edge_write(struct tty_struct *tty, struct usb_serial_port *port, | 211 | static int edge_write(struct tty_struct *tty, struct usb_serial_port *port, |
213 | const unsigned char *buf, int count); | 212 | const unsigned char *buf, int count); |
214 | static int edge_write_room(struct tty_struct *tty); | 213 | static int edge_write_room(struct tty_struct *tty); |
@@ -965,7 +964,7 @@ static int edge_open(struct tty_struct *tty, | |||
965 | 964 | ||
966 | if (!edge_port->txfifo.fifo) { | 965 | if (!edge_port->txfifo.fifo) { |
967 | dbg("%s - no memory", __func__); | 966 | dbg("%s - no memory", __func__); |
968 | edge_close(tty, port, filp); | 967 | edge_close(port); |
969 | return -ENOMEM; | 968 | return -ENOMEM; |
970 | } | 969 | } |
971 | 970 | ||
@@ -975,7 +974,7 @@ static int edge_open(struct tty_struct *tty, | |||
975 | 974 | ||
976 | if (!edge_port->write_urb) { | 975 | if (!edge_port->write_urb) { |
977 | dbg("%s - no memory", __func__); | 976 | dbg("%s - no memory", __func__); |
978 | edge_close(tty, port, filp); | 977 | edge_close(port); |
979 | return -ENOMEM; | 978 | return -ENOMEM; |
980 | } | 979 | } |
981 | 980 | ||
@@ -1099,8 +1098,7 @@ static void block_until_tx_empty(struct edgeport_port *edge_port) | |||
1099 | * edge_close | 1098 | * edge_close |
1100 | * this function is called by the tty driver when a port is closed | 1099 | * this function is called by the tty driver when a port is closed |
1101 | *****************************************************************************/ | 1100 | *****************************************************************************/ |
1102 | static void edge_close(struct tty_struct *tty, | 1101 | static void edge_close(struct usb_serial_port *port) |
1103 | struct usb_serial_port *port, struct file *filp) | ||
1104 | { | 1102 | { |
1105 | struct edgeport_serial *edge_serial; | 1103 | struct edgeport_serial *edge_serial; |
1106 | struct edgeport_port *edge_port; | 1104 | struct edgeport_port *edge_port; |