diff options
Diffstat (limited to 'drivers/usb/serial/empeg.c')
-rw-r--r-- | drivers/usb/serial/empeg.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c index 80cb3471adbe..33c9e9cf9eb2 100644 --- a/drivers/usb/serial/empeg.c +++ b/drivers/usb/serial/empeg.c | |||
@@ -79,8 +79,7 @@ static int debug; | |||
79 | #define EMPEG_PRODUCT_ID 0x0001 | 79 | #define EMPEG_PRODUCT_ID 0x0001 |
80 | 80 | ||
81 | /* function prototypes for an empeg-car player */ | 81 | /* function prototypes for an empeg-car player */ |
82 | static int empeg_open(struct tty_struct *tty, struct usb_serial_port *port, | 82 | static int empeg_open(struct tty_struct *tty, struct usb_serial_port *port); |
83 | struct file *filp); | ||
84 | static void empeg_close(struct usb_serial_port *port); | 83 | static void empeg_close(struct usb_serial_port *port); |
85 | static int empeg_write(struct tty_struct *tty, struct usb_serial_port *port, | 84 | static int empeg_write(struct tty_struct *tty, struct usb_serial_port *port, |
86 | const unsigned char *buf, | 85 | const unsigned char *buf, |
@@ -90,8 +89,7 @@ static int empeg_chars_in_buffer(struct tty_struct *tty); | |||
90 | static void empeg_throttle(struct tty_struct *tty); | 89 | static void empeg_throttle(struct tty_struct *tty); |
91 | static void empeg_unthrottle(struct tty_struct *tty); | 90 | static void empeg_unthrottle(struct tty_struct *tty); |
92 | static int empeg_startup(struct usb_serial *serial); | 91 | static int empeg_startup(struct usb_serial *serial); |
93 | static void empeg_set_termios(struct tty_struct *tty, | 92 | static void empeg_init_termios(struct tty_struct *tty); |
94 | struct usb_serial_port *port, struct ktermios *old_termios); | ||
95 | static void empeg_write_bulk_callback(struct urb *urb); | 93 | static void empeg_write_bulk_callback(struct urb *urb); |
96 | static void empeg_read_bulk_callback(struct urb *urb); | 94 | static void empeg_read_bulk_callback(struct urb *urb); |
97 | 95 | ||
@@ -123,7 +121,7 @@ static struct usb_serial_driver empeg_device = { | |||
123 | .throttle = empeg_throttle, | 121 | .throttle = empeg_throttle, |
124 | .unthrottle = empeg_unthrottle, | 122 | .unthrottle = empeg_unthrottle, |
125 | .attach = empeg_startup, | 123 | .attach = empeg_startup, |
126 | .set_termios = empeg_set_termios, | 124 | .init_termios = empeg_init_termios, |
127 | .write = empeg_write, | 125 | .write = empeg_write, |
128 | .write_room = empeg_write_room, | 126 | .write_room = empeg_write_room, |
129 | .chars_in_buffer = empeg_chars_in_buffer, | 127 | .chars_in_buffer = empeg_chars_in_buffer, |
@@ -142,17 +140,13 @@ static int bytes_out; | |||
142 | /****************************************************************************** | 140 | /****************************************************************************** |
143 | * Empeg specific driver functions | 141 | * Empeg specific driver functions |
144 | ******************************************************************************/ | 142 | ******************************************************************************/ |
145 | static int empeg_open(struct tty_struct *tty, struct usb_serial_port *port, | 143 | static int empeg_open(struct tty_struct *tty,struct usb_serial_port *port) |
146 | struct file *filp) | ||
147 | { | 144 | { |
148 | struct usb_serial *serial = port->serial; | 145 | struct usb_serial *serial = port->serial; |
149 | int result = 0; | 146 | int result = 0; |
150 | 147 | ||
151 | dbg("%s - port %d", __func__, port->number); | 148 | dbg("%s - port %d", __func__, port->number); |
152 | 149 | ||
153 | /* Force default termio settings */ | ||
154 | empeg_set_termios(tty, port, NULL) ; | ||
155 | |||
156 | bytes_in = 0; | 150 | bytes_in = 0; |
157 | bytes_out = 0; | 151 | bytes_out = 0; |
158 | 152 | ||
@@ -425,11 +419,9 @@ static int empeg_startup(struct usb_serial *serial) | |||
425 | } | 419 | } |
426 | 420 | ||
427 | 421 | ||
428 | static void empeg_set_termios(struct tty_struct *tty, | 422 | static void empeg_init_termios(struct tty_struct *tty) |
429 | struct usb_serial_port *port, struct ktermios *old_termios) | ||
430 | { | 423 | { |
431 | struct ktermios *termios = tty->termios; | 424 | struct ktermios *termios = tty->termios; |
432 | dbg("%s - port %d", __func__, port->number); | ||
433 | 425 | ||
434 | /* | 426 | /* |
435 | * The empeg-car player wants these particular tty settings. | 427 | * The empeg-car player wants these particular tty settings. |