mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 10:50:53 +07:00
tty: Update cdc_acm
The CDC ACM driver uses the tty layer correctly so needs conversion. Start by adding and initializing the port structures. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
335f8514f2
commit
739e0285cb
@ -89,6 +89,9 @@ static DEFINE_MUTEX(open_mutex);
|
|||||||
|
|
||||||
#define ACM_READY(acm) (acm && acm->dev && acm->used)
|
#define ACM_READY(acm) (acm && acm->dev && acm->used)
|
||||||
|
|
||||||
|
static const struct tty_port_operations acm_port_ops = {
|
||||||
|
};
|
||||||
|
|
||||||
#ifdef VERBOSE_DEBUG
|
#ifdef VERBOSE_DEBUG
|
||||||
#define verbose 1
|
#define verbose 1
|
||||||
#else
|
#else
|
||||||
@ -1082,6 +1085,8 @@ static int acm_probe (struct usb_interface *intf,
|
|||||||
spin_lock_init(&acm->read_lock);
|
spin_lock_init(&acm->read_lock);
|
||||||
mutex_init(&acm->mutex);
|
mutex_init(&acm->mutex);
|
||||||
acm->rx_endpoint = usb_rcvbulkpipe(usb_dev, epread->bEndpointAddress);
|
acm->rx_endpoint = usb_rcvbulkpipe(usb_dev, epread->bEndpointAddress);
|
||||||
|
tty_port_init(&acm->port);
|
||||||
|
acm->port.ops = &acm_port_ops;
|
||||||
|
|
||||||
buf = usb_buffer_alloc(usb_dev, ctrlsize, GFP_KERNEL, &acm->ctrl_dma);
|
buf = usb_buffer_alloc(usb_dev, ctrlsize, GFP_KERNEL, &acm->ctrl_dma);
|
||||||
if (!buf) {
|
if (!buf) {
|
||||||
|
@ -90,6 +90,7 @@ struct acm {
|
|||||||
struct usb_interface *control; /* control interface */
|
struct usb_interface *control; /* control interface */
|
||||||
struct usb_interface *data; /* data interface */
|
struct usb_interface *data; /* data interface */
|
||||||
struct tty_struct *tty; /* the corresponding tty */
|
struct tty_struct *tty; /* the corresponding tty */
|
||||||
|
struct tty_port port; /* our tty port data */
|
||||||
struct urb *ctrlurb; /* urbs */
|
struct urb *ctrlurb; /* urbs */
|
||||||
u8 *ctrl_buffer; /* buffers of urbs */
|
u8 *ctrl_buffer; /* buffers of urbs */
|
||||||
dma_addr_t ctrl_dma; /* dma handles of buffers */
|
dma_addr_t ctrl_dma; /* dma handles of buffers */
|
||||||
|
Loading…
Reference in New Issue
Block a user