return -ENOMEM;
if (requestype & 0x80) {
ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), request,
return -ENOMEM;
if (requestype & 0x80) {
ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), request,
- dev_printk(KERN_DEBUG, &dev->dev, "cp210x: control failed cmd rqt %u "
- "rq %u len %u ret %d\n", requestype, request, size, ret);
+ dev_printk(KERN_DEBUG, &dev->dev,
+ "cp210x: ctl failed cmd rqt %u rq %u len %u ret %d\n",
+ requestype, request, size, ret);
- /* Is this better than usb_device_reset? It may be. Once a client issues
- * the reset ioctl, it must disconnect and reconnect, since the USB
- * connections are torn down. We also ignore the error return, since
- * the part resets and doesn't send one...
+ /* Is this better than usb_device_reset? It may be. Once a client
+ * issues the reset ioctl, it must disconnect and reconnect, since the
+ * USB connections are torn down. We also ignore the error return,
+ * since the part resets and doesn't send one...
*/
cp210x_ctlmsg(port, 0xff, 0x40, 0x0008, 0x00, NULL, 0);
#else
*/
cp210x_ctlmsg(port, 0xff, 0x40, 0x0008, 0x00, NULL, 0);
#else
lconfig.reset.mode = cpu_to_be16(config->reset.mode);
lconfig.reset.latch = cpu_to_be16(config->reset.latch);
lconfig.suspend.mode = cpu_to_be16(config->suspend.mode);
lconfig.reset.mode = cpu_to_be16(config->reset.mode);
lconfig.reset.latch = cpu_to_be16(config->reset.latch);
lconfig.suspend.mode = cpu_to_be16(config->suspend.mode);
ret = cp210x_ctlmsg(port, 0xff, 0xc0, 0x370c, 0, config,
sizeof(struct cp210x_port_config));
if (ret == sizeof(struct cp210x_port_config)) {
ret = cp210x_ctlmsg(port, 0xff, 0xc0, 0x370c, 0, config,
sizeof(struct cp210x_port_config));
if (ret == sizeof(struct cp210x_port_config)) {
config->reset.mode = be16_to_cpu(config->reset.mode);
config->reset.lowPower = be16_to_cpu(config->reset.lowPower);
config->reset.latch = be16_to_cpu(config->reset.latch);
config->reset.mode = be16_to_cpu(config->reset.mode);
config->reset.lowPower = be16_to_cpu(config->reset.lowPower);
config->reset.latch = be16_to_cpu(config->reset.latch);
- if (cp210x_tiocmset(tty, file, cmd==TIOCMBIC ? 0 : val,
- cmd==TIOCMBIC ? val : 0))
+ if (cp210x_tiocmset(tty, file, (cmd == TIOCMBIC) ? 0 : val,
+ (cmd == TIOCMBIC) ? val : 0))
- (cmd==CP210x_IOCTL_GPIOBIC) ? 0 : arg,
- (cmd==CP210x_IOCTL_GPIOBIC) ? arg : 0))
+ (cmd == CP210x_IOCTL_GPIOBIC) ? 0 : arg,
+ (cmd == CP210x_IOCTL_GPIOBIC) ? arg : 0))