Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

symbol: Remove various bits of left over junk

There are various bits of code here that are unfinished and instead of
being harmless either confuse or spew stuff into the logs at higher than
debug level. They can and should go away.

Also remove the bogus use of tty->lowlatency. We fixed the need for this hack
long ago (with the flip buffer rewrite) but people keep copying it into drivers.

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Alan Cox and committed by
Linus Torvalds
22654b41 912299f6

-67
-67
drivers/usb/serial/symbolserial.c
··· 139 139 priv->port = port; 140 140 spin_unlock_irqrestore(&priv->lock, flags); 141 141 142 - /* 143 - * Force low_latency on so that our tty_push actually forces the data 144 - * through, otherwise it is scheduled, and with high data rates (like 145 - * with OHCI) data can get lost. 146 - */ 147 - if (tty) 148 - tty->low_latency = 1; 149 - 150 142 /* Start reading from the device */ 151 143 usb_fill_int_urb(priv->int_urb, priv->udev, 152 144 usb_rcvintpipe(priv->udev, priv->int_address), ··· 195 203 dev_err(&port->dev, 196 204 "%s - failed submitting read urb, error %d\n", 197 205 __func__, result); 198 - } 199 - 200 - static int symbol_ioctl(struct tty_struct *tty, struct file *file, 201 - unsigned int cmd, unsigned long arg) 202 - { 203 - struct usb_serial_port *port = tty->driver_data; 204 - struct device *dev = &port->dev; 205 - 206 - /* 207 - * Right now we need to figure out what commands 208 - * most userspace tools want to see for this driver, 209 - * so just log the things. 210 - */ 211 - switch (cmd) { 212 - case TIOCSERGETLSR: 213 - dev_info(dev, "%s: TIOCSERGETLSR\n", __func__); 214 - break; 215 - 216 - case TIOCGSERIAL: 217 - dev_info(dev, "%s: TIOCGSERIAL\n", __func__); 218 - break; 219 - 220 - case TIOCMIWAIT: 221 - dev_info(dev, "%s: TIOCMIWAIT\n", __func__); 222 - break; 223 - 224 - case TIOCGICOUNT: 225 - dev_info(dev, "%s: TIOCGICOUNT\n", __func__); 226 - break; 227 - default: 228 - dev_info(dev, "%s: unknown (%d)\n", __func__, cmd); 229 - } 230 - return -ENOIOCTLCMD; 231 - } 232 - 233 - static int symbol_tiocmget(struct tty_struct *tty, struct file *file) 234 - { 235 - struct usb_serial_port *port = tty->driver_data; 236 - struct device *dev = &port->dev; 237 - 238 - /* TODO */ 239 - /* probably just need to shadow whatever was sent to us here */ 240 - dev_info(dev, "%s\n", __func__); 241 - return 0; 242 - } 243 - 244 - static int symbol_tiocmset(struct tty_struct *tty, struct file *file, 245 - unsigned int set, unsigned int clear) 246 - { 247 - struct usb_serial_port *port = tty->driver_data; 248 - struct device *dev = &port->dev; 249 - 250 - /* TODO */ 251 - /* probably just need to shadow whatever was sent to us here */ 252 - dev_info(dev, "%s\n", __func__); 253 - return 0; 254 206 } 255 207 256 208 static int symbol_startup(struct usb_serial *serial) ··· 303 367 .shutdown = symbol_shutdown, 304 368 .throttle = symbol_throttle, 305 369 .unthrottle = symbol_unthrottle, 306 - .ioctl = symbol_ioctl, 307 - .tiocmget = symbol_tiocmget, 308 - .tiocmset = symbol_tiocmset, 309 370 }; 310 371 311 372 static int __init symbol_init(void)