omninet.c (5833041f1b130e5823a99d03b14538282e5ad345) | omninet.c (fd11961a2deaf4220ca90ce734439b4006db2911) |
---|---|
1/* 2 * USB ZyXEL omni.net LCD PLUS driver 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License version 6 * 2 as published by the Free Software Foundation. 7 * 8 * See Documentation/usb/usb-serial.txt for more information on using this --- 134 unchanged lines hidden (view full) --- 143 int result = 0; 144 145 dbg("%s - port %d", __func__, port->number); 146 147 wport = serial->port[1]; 148 tty_port_tty_set(&wport->port, tty); 149 150 /* Start reading from the device */ | 1/* 2 * USB ZyXEL omni.net LCD PLUS driver 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License version 6 * 2 as published by the Free Software Foundation. 7 * 8 * See Documentation/usb/usb-serial.txt for more information on using this --- 134 unchanged lines hidden (view full) --- 143 int result = 0; 144 145 dbg("%s - port %d", __func__, port->number); 146 147 wport = serial->port[1]; 148 tty_port_tty_set(&wport->port, tty); 149 150 /* Start reading from the device */ |
151 usb_fill_bulk_urb(port->read_urb, serial->dev, 152 usb_rcvbulkpipe(serial->dev, 153 port->bulk_in_endpointAddress), 154 port->read_urb->transfer_buffer, 155 port->read_urb->transfer_buffer_length, 156 omninet_read_bulk_callback, port); 157 | |
158 result = usb_submit_urb(port->read_urb, GFP_KERNEL); 159 if (result) 160 dev_err(&port->dev, 161 "%s - failed submitting read urb, error %d\n", 162 __func__, result); 163 return result; 164} 165 --- 40 unchanged lines hidden (view full) --- 206 struct tty_struct *tty = tty_port_tty_get(&port->port); 207 tty_insert_flip_string(tty, data + OMNINET_DATAOFFSET, 208 header->oh_len); 209 tty_flip_buffer_push(tty); 210 tty_kref_put(tty); 211 } 212 213 /* Continue trying to always read */ | 151 result = usb_submit_urb(port->read_urb, GFP_KERNEL); 152 if (result) 153 dev_err(&port->dev, 154 "%s - failed submitting read urb, error %d\n", 155 __func__, result); 156 return result; 157} 158 --- 40 unchanged lines hidden (view full) --- 199 struct tty_struct *tty = tty_port_tty_get(&port->port); 200 tty_insert_flip_string(tty, data + OMNINET_DATAOFFSET, 201 header->oh_len); 202 tty_flip_buffer_push(tty); 203 tty_kref_put(tty); 204 } 205 206 /* Continue trying to always read */ |
214 usb_fill_bulk_urb(urb, port->serial->dev, 215 usb_rcvbulkpipe(port->serial->dev, 216 port->bulk_in_endpointAddress), 217 urb->transfer_buffer, urb->transfer_buffer_length, 218 omninet_read_bulk_callback, port); | |
219 result = usb_submit_urb(urb, GFP_ATOMIC); 220 if (result) 221 dev_err(&port->dev, 222 "%s - failed resubmitting read urb, error %d\n", 223 __func__, result); 224} 225 226static int omninet_write(struct tty_struct *tty, struct usb_serial_port *port, --- 143 unchanged lines hidden --- | 207 result = usb_submit_urb(urb, GFP_ATOMIC); 208 if (result) 209 dev_err(&port->dev, 210 "%s - failed resubmitting read urb, error %d\n", 211 __func__, result); 212} 213 214static int omninet_write(struct tty_struct *tty, struct usb_serial_port *port, --- 143 unchanged lines hidden --- |