提交 3645ea87 编写于 作者: J Johan Hovold

USB: mxu11x0: fix debug-message typos

Fix a couple of debug-message typos, and do some minor clean ups.
Signed-off-by: NJohan Hovold <johan@kernel.org>
上级 554eb0f2
/* /*
*
* USB Moxa UPORT 11x0 Serial Driver * USB Moxa UPORT 11x0 Serial Driver
* *
* Copyright (C) 2007 MOXA Technologies Co., Ltd. * Copyright (C) 2007 MOXA Technologies Co., Ltd.
...@@ -494,10 +493,10 @@ static void mxu1_set_termios(struct tty_struct *tty, ...@@ -494,10 +493,10 @@ static void mxu1_set_termios(struct tty_struct *tty,
} }
dev_dbg(&port->dev, dev_dbg(&port->dev,
"%s - clfag %08x, iflag %08x\n", __func__, cflag, iflag); "%s - cflag 0x%08x, iflag 0x%08x\n", __func__, cflag, iflag);
if (old_termios) { if (old_termios) {
dev_dbg(&port->dev, "%s - old clfag %08x, old iflag %08x\n", dev_dbg(&port->dev, "%s - old cflag 0x%08x, old iflag 0x%08x\n",
__func__, __func__,
old_termios->c_cflag, old_termios->c_cflag,
old_termios->c_iflag); old_termios->c_iflag);
...@@ -764,7 +763,6 @@ static int mxu1_open(struct tty_struct *tty, struct usb_serial_port *port) ...@@ -764,7 +763,6 @@ static int mxu1_open(struct tty_struct *tty, struct usb_serial_port *port)
mxport->msr = 0; mxport->msr = 0;
dev_dbg(&port->dev, "%s - start interrupt in urb\n", __func__);
status = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); status = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
if (status) { if (status) {
dev_err(&port->dev, "failed to submit interrupt urb: %d\n", dev_err(&port->dev, "failed to submit interrupt urb: %d\n",
...@@ -842,7 +840,7 @@ static int mxu1_open(struct tty_struct *tty, struct usb_serial_port *port) ...@@ -842,7 +840,7 @@ static int mxu1_open(struct tty_struct *tty, struct usb_serial_port *port)
goto unlink_int_urb; goto unlink_int_urb;
} }
return status; return 0;
unlink_int_urb: unlink_int_urb:
usb_kill_urb(port->interrupt_in_urb); usb_kill_urb(port->interrupt_in_urb);
...@@ -859,21 +857,20 @@ static void mxu1_close(struct usb_serial_port *port) ...@@ -859,21 +857,20 @@ static void mxu1_close(struct usb_serial_port *port)
status = mxu1_send_ctrl_urb(port->serial, MXU1_CLOSE_PORT, status = mxu1_send_ctrl_urb(port->serial, MXU1_CLOSE_PORT,
0, MXU1_UART1_PORT); 0, MXU1_UART1_PORT);
if (status) if (status) {
dev_err(&port->dev, "failed to send close port command: %d\n", dev_err(&port->dev, "failed to send close port command: %d\n",
status); status);
}
} }
static void mxu1_handle_new_msr(struct usb_serial_port *port, u8 msr) static void mxu1_handle_new_msr(struct usb_serial_port *port, u8 msr)
{ {
struct mxu1_port *mxport = usb_get_serial_port_data(port);
struct async_icount *icount; struct async_icount *icount;
struct mxu1_port *mxport;
unsigned long flags; unsigned long flags;
dev_dbg(&port->dev, "%s - msr 0x%02X\n", __func__, msr); dev_dbg(&port->dev, "%s - msr 0x%02X\n", __func__, msr);
mxport = usb_get_serial_port_data(port);
spin_lock_irqsave(&mxport->spinlock, flags); spin_lock_irqsave(&mxport->spinlock, flags);
mxport->msr = msr & MXU1_MSR_MASK; mxport->msr = msr & MXU1_MSR_MASK;
spin_unlock_irqrestore(&mxport->spinlock, flags); spin_unlock_irqrestore(&mxport->spinlock, flags);
...@@ -953,9 +950,10 @@ static void mxu1_interrupt_callback(struct urb *urb) ...@@ -953,9 +950,10 @@ static void mxu1_interrupt_callback(struct urb *urb)
exit: exit:
status = usb_submit_urb(urb, GFP_ATOMIC); status = usb_submit_urb(urb, GFP_ATOMIC);
if (status) if (status) {
dev_err(&port->dev, "resubmit interrupt urb failed: %d\n", dev_err(&port->dev, "resubmit interrupt urb failed: %d\n",
status); status);
}
} }
static struct usb_serial_driver mxu11x0_device = { static struct usb_serial_driver mxu11x0_device = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册