Skip to content

Commit

Permalink
USB: ch341.c: remove dbg() tracing calls
Browse files Browse the repository at this point in the history
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Johan Hovold <jhovold@gmail.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Greg Kroah-Hartman committed May 3, 2012
1 parent d17a44d commit 2ec7d45
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions drivers/usb/serial/ch341.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@ static int ch341_set_baudrate(struct usb_device *dev,
unsigned long factor;
short divisor;

dbg("ch341_set_baudrate(%d)", priv->baud_rate);

if (!priv->baud_rate)
return -EINVAL;
factor = (CH341_BAUDBASE_FACTOR / priv->baud_rate);
Expand All @@ -153,7 +151,6 @@ static int ch341_set_baudrate(struct usb_device *dev,

static int ch341_set_handshake(struct usb_device *dev, u8 control)
{
dbg("ch341_set_handshake(0x%02x)", control);
return ch341_control_out(dev, 0xa4, ~control, 0);
}

Expand All @@ -164,8 +161,6 @@ static int ch341_get_status(struct usb_device *dev, struct ch341_private *priv)
const unsigned size = 8;
unsigned long flags;

dbg("ch341_get_status()");

buffer = kmalloc(size, GFP_KERNEL);
if (!buffer)
return -ENOMEM;
Expand Down Expand Up @@ -196,8 +191,6 @@ static int ch341_configure(struct usb_device *dev, struct ch341_private *priv)
int r;
const unsigned size = 8;

dbg("ch341_configure()");

buffer = kmalloc(size, GFP_KERNEL);
if (!buffer)
return -ENOMEM;
Expand Down Expand Up @@ -254,8 +247,6 @@ static int ch341_attach(struct usb_serial *serial)
struct ch341_private *priv;
int r;

dbg("ch341_attach()");

/* private data */
priv = kzalloc(sizeof(struct ch341_private), GFP_KERNEL);
if (!priv)
Expand Down Expand Up @@ -290,7 +281,6 @@ static void ch341_dtr_rts(struct usb_serial_port *port, int on)
struct ch341_private *priv = usb_get_serial_port_data(port);
unsigned long flags;

dbg("%s - port %d", __func__, port->number);
/* drop DTR and RTS */
spin_lock_irqsave(&priv->lock, flags);
if (on)
Expand All @@ -304,8 +294,6 @@ static void ch341_dtr_rts(struct usb_serial_port *port, int on)

static void ch341_close(struct usb_serial_port *port)
{
dbg("%s - port %d", __func__, port->number);

usb_serial_generic_close(port);
usb_kill_urb(port->interrupt_in_urb);
}
Expand All @@ -318,8 +306,6 @@ static int ch341_open(struct tty_struct *tty, struct usb_serial_port *port)
struct ch341_private *priv = usb_get_serial_port_data(serial->port[0]);
int r;

dbg("ch341_open()");

priv->baud_rate = DEFAULT_BAUD_RATE;

r = ch341_configure(serial->dev, priv);
Expand Down Expand Up @@ -358,8 +344,6 @@ static void ch341_set_termios(struct tty_struct *tty,
unsigned baud_rate;
unsigned long flags;

dbg("ch341_set_termios()");

baud_rate = tty_get_baud_rate(tty);

priv->baud_rate = baud_rate;
Expand Down Expand Up @@ -393,8 +377,6 @@ static void ch341_break_ctl(struct tty_struct *tty, int break_state)
uint16_t reg_contents;
uint8_t *break_reg;

dbg("%s()", __func__);

break_reg = kmalloc(2, GFP_KERNEL);
if (!break_reg) {
dev_err(&port->dev, "%s - kmalloc failed\n", __func__);
Expand Down Expand Up @@ -461,8 +443,6 @@ static void ch341_read_int_callback(struct urb *urb)
unsigned int actual_length = urb->actual_length;
int status;

dbg("%s (%d)", __func__, port->number);

switch (urb->status) {
case 0:
/* success */
Expand Down Expand Up @@ -580,8 +560,6 @@ static int ch341_tiocmget(struct tty_struct *tty)
u8 status;
unsigned int result;

dbg("%s (%d)", __func__, port->number);

spin_lock_irqsave(&priv->lock, flags);
mcr = priv->line_control;
status = priv->line_status;
Expand Down

0 comments on commit 2ec7d45

Please sign in to comment.