aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2009-06-11 07:26:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-11 11:50:56 -0400
commit335f8514f200e63d689113d29cb7253a5c282967 (patch)
tree11504d090e8e2cd3c1ada3e6765f69f216065d00 /include/linux/usb
parent1ec739be75a6cb961a46ba0b1982d0edb7f27558 (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 'include/linux/usb')
-rw-r--r--include/linux/usb/serial.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index 625e9e4639c6..8cdfed738fe4 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -224,8 +224,7 @@ struct usb_serial_driver {
224 /* Called by console with tty = NULL and by tty */ 224 /* Called by console with tty = NULL and by tty */
225 int (*open)(struct tty_struct *tty, 225 int (*open)(struct tty_struct *tty,
226 struct usb_serial_port *port, struct file *filp); 226 struct usb_serial_port *port, struct file *filp);
227 void (*close)(struct tty_struct *tty, 227 void (*close)(struct usb_serial_port *port);
228 struct usb_serial_port *port, struct file *filp);
229 int (*write)(struct tty_struct *tty, struct usb_serial_port *port, 228 int (*write)(struct tty_struct *tty, struct usb_serial_port *port,
230 const unsigned char *buf, int count); 229 const unsigned char *buf, int count);
231 /* Called only by the tty layer */ 230 /* Called only by the tty layer */
@@ -241,6 +240,10 @@ struct usb_serial_driver {
241 int (*tiocmget)(struct tty_struct *tty, struct file *file); 240 int (*tiocmget)(struct tty_struct *tty, struct file *file);
242 int (*tiocmset)(struct tty_struct *tty, struct file *file, 241 int (*tiocmset)(struct tty_struct *tty, struct file *file,
243 unsigned int set, unsigned int clear); 242 unsigned int set, unsigned int clear);
243 /* Called by the tty layer for port level work. There may or may not
244 be an attached tty at this point */
245 void (*dtr_rts)(struct usb_serial_port *port, int on);
246 int (*carrier_raised)(struct usb_serial_port *port);
244 /* USB events */ 247 /* USB events */
245 void (*read_int_callback)(struct urb *urb); 248 void (*read_int_callback)(struct urb *urb);
246 void (*write_int_callback)(struct urb *urb); 249 void (*write_int_callback)(struct urb *urb);
@@ -283,8 +286,7 @@ extern int usb_serial_generic_open(struct tty_struct *tty,
283 struct usb_serial_port *port, struct file *filp); 286 struct usb_serial_port *port, struct file *filp);
284extern int usb_serial_generic_write(struct tty_struct *tty, 287extern int usb_serial_generic_write(struct tty_struct *tty,
285 struct usb_serial_port *port, const unsigned char *buf, int count); 288 struct usb_serial_port *port, const unsigned char *buf, int count);
286extern void usb_serial_generic_close(struct tty_struct *tty, 289extern void usb_serial_generic_close(struct usb_serial_port *port);
287 struct usb_serial_port *port, struct file *filp);
288extern int usb_serial_generic_resume(struct usb_serial *serial); 290extern int usb_serial_generic_resume(struct usb_serial *serial);
289extern int usb_serial_generic_write_room(struct tty_struct *tty); 291extern int usb_serial_generic_write_room(struct tty_struct *tty);
290extern int usb_serial_generic_chars_in_buffer(struct tty_struct *tty); 292extern int usb_serial_generic_chars_in_buffer(struct tty_struct *tty);