cp210x.c (ba4bbdabecd11530dca78dbae3ee7e51ffdc0a06) | cp210x.c (befc28a720362cb2b14601b5ba3d1f4c600ffaec) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Silicon Laboratories CP210x USB to RS232 serial adaptor driver 4 * 5 * Copyright (C) 2005 Craig Shelley (craig@microtron.org.uk) 6 * Copyright (C) 2010-2021 Johan Hovold (johan@kernel.org) 7 * 8 * Support to set flow control line levels using TIOCMGET and TIOCMSET --- 624 unchanged lines hidden (view full) --- 633 634 dmabuf = kmalloc(bufsize, GFP_KERNEL); 635 if (!dmabuf) 636 return -ENOMEM; 637 638 result = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), 639 req, REQTYPE_INTERFACE_TO_HOST, 0, 640 port_priv->bInterfaceNumber, dmabuf, bufsize, | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Silicon Laboratories CP210x USB to RS232 serial adaptor driver 4 * 5 * Copyright (C) 2005 Craig Shelley (craig@microtron.org.uk) 6 * Copyright (C) 2010-2021 Johan Hovold (johan@kernel.org) 7 * 8 * Support to set flow control line levels using TIOCMGET and TIOCMSET --- 624 unchanged lines hidden (view full) --- 633 634 dmabuf = kmalloc(bufsize, GFP_KERNEL); 635 if (!dmabuf) 636 return -ENOMEM; 637 638 result = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), 639 req, REQTYPE_INTERFACE_TO_HOST, 0, 640 port_priv->bInterfaceNumber, dmabuf, bufsize, |
641 USB_CTRL_SET_TIMEOUT); | 641 USB_CTRL_GET_TIMEOUT); |
642 if (result == bufsize) { 643 memcpy(buf, dmabuf, bufsize); 644 result = 0; 645 } else { 646 dev_err(&port->dev, "failed get req 0x%x size %d status: %d\n", 647 req, bufsize, result); 648 if (result >= 0) 649 result = -EIO; --- 1539 unchanged lines hidden --- | 642 if (result == bufsize) { 643 memcpy(buf, dmabuf, bufsize); 644 result = 0; 645 } else { 646 dev_err(&port->dev, "failed get req 0x%x size %d status: %d\n", 647 req, bufsize, result); 648 if (result >= 0) 649 result = -EIO; --- 1539 unchanged lines hidden --- |