Commit 64318a52 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: sierra.c: remove dbg() tracing calls

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: Alan Stern <stern@rowland.harvard.edu>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Johan Hovold <jhovold@gmail.com>
CC: Anton Samokhvalov <pg83@yandex.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3a3eec0c
...@@ -63,9 +63,7 @@ struct sierra_intf_private { ...@@ -63,9 +63,7 @@ struct sierra_intf_private {
static int sierra_set_power_state(struct usb_device *udev, __u16 swiState) static int sierra_set_power_state(struct usb_device *udev, __u16 swiState)
{ {
int result; return usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
dev_dbg(&udev->dev, "%s\n", __func__);
result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
SWIMS_USB_REQUEST_SetPower, /* __u8 request */ SWIMS_USB_REQUEST_SetPower, /* __u8 request */
USB_TYPE_VENDOR, /* __u8 request type */ USB_TYPE_VENDOR, /* __u8 request type */
swiState, /* __u16 value */ swiState, /* __u16 value */
...@@ -73,14 +71,11 @@ static int sierra_set_power_state(struct usb_device *udev, __u16 swiState) ...@@ -73,14 +71,11 @@ static int sierra_set_power_state(struct usb_device *udev, __u16 swiState)
NULL, /* void *data */ NULL, /* void *data */
0, /* __u16 size */ 0, /* __u16 size */
USB_CTRL_SET_TIMEOUT); /* int timeout */ USB_CTRL_SET_TIMEOUT); /* int timeout */
return result;
} }
static int sierra_vsc_set_nmea(struct usb_device *udev, __u16 enable) static int sierra_vsc_set_nmea(struct usb_device *udev, __u16 enable)
{ {
int result; return usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
dev_dbg(&udev->dev, "%s\n", __func__);
result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
SWIMS_USB_REQUEST_SetNmea, /* __u8 request */ SWIMS_USB_REQUEST_SetNmea, /* __u8 request */
USB_TYPE_VENDOR, /* __u8 request type */ USB_TYPE_VENDOR, /* __u8 request type */
enable, /* __u16 value */ enable, /* __u16 value */
...@@ -88,7 +83,6 @@ static int sierra_vsc_set_nmea(struct usb_device *udev, __u16 enable) ...@@ -88,7 +83,6 @@ static int sierra_vsc_set_nmea(struct usb_device *udev, __u16 enable)
NULL, /* void *data */ NULL, /* void *data */
0, /* __u16 size */ 0, /* __u16 size */
USB_CTRL_SET_TIMEOUT); /* int timeout */ USB_CTRL_SET_TIMEOUT); /* int timeout */
return result;
} }
static int sierra_calc_num_ports(struct usb_serial *serial) static int sierra_calc_num_ports(struct usb_serial *serial)
...@@ -96,8 +90,6 @@ static int sierra_calc_num_ports(struct usb_serial *serial) ...@@ -96,8 +90,6 @@ static int sierra_calc_num_ports(struct usb_serial *serial)
int num_ports = 0; int num_ports = 0;
u8 ifnum, numendpoints; u8 ifnum, numendpoints;
dev_dbg(&serial->dev->dev, "%s\n", __func__);
ifnum = serial->interface->cur_altsetting->desc.bInterfaceNumber; ifnum = serial->interface->cur_altsetting->desc.bInterfaceNumber;
numendpoints = serial->interface->cur_altsetting->desc.bNumEndpoints; numendpoints = serial->interface->cur_altsetting->desc.bNumEndpoints;
...@@ -150,7 +142,6 @@ static int sierra_calc_interface(struct usb_serial *serial) ...@@ -150,7 +142,6 @@ static int sierra_calc_interface(struct usb_serial *serial)
int interface; int interface;
struct usb_interface *p_interface; struct usb_interface *p_interface;
struct usb_host_interface *p_host_interface; struct usb_host_interface *p_host_interface;
dev_dbg(&serial->dev->dev, "%s\n", __func__);
/* Get the interface structure pointer from the serial struct */ /* Get the interface structure pointer from the serial struct */
p_interface = serial->interface; p_interface = serial->interface;
...@@ -175,9 +166,8 @@ static int sierra_probe(struct usb_serial *serial, ...@@ -175,9 +166,8 @@ static int sierra_probe(struct usb_serial *serial,
u8 ifnum; u8 ifnum;
udev = serial->dev; udev = serial->dev;
dev_dbg(&udev->dev, "%s\n", __func__);
ifnum = sierra_calc_interface(serial); ifnum = sierra_calc_interface(serial);
/* /*
* If this interface supports more than 1 alternate * If this interface supports more than 1 alternate
* select the 2nd one * select the 2nd one
...@@ -344,8 +334,6 @@ static int sierra_send_setup(struct usb_serial_port *port) ...@@ -344,8 +334,6 @@ static int sierra_send_setup(struct usb_serial_port *port)
int do_send = 0; int do_send = 0;
int retval; int retval;
dev_dbg(&port->dev, "%s\n", __func__);
portdata = usb_get_serial_port_data(port); portdata = usb_get_serial_port_data(port);
if (portdata->dtr_state) if (portdata->dtr_state)
...@@ -393,7 +381,6 @@ static int sierra_send_setup(struct usb_serial_port *port) ...@@ -393,7 +381,6 @@ static int sierra_send_setup(struct usb_serial_port *port)
static void sierra_set_termios(struct tty_struct *tty, static void sierra_set_termios(struct tty_struct *tty,
struct usb_serial_port *port, struct ktermios *old_termios) struct usb_serial_port *port, struct ktermios *old_termios)
{ {
dev_dbg(&port->dev, "%s\n", __func__);
tty_termios_copy_hw(tty->termios, old_termios); tty_termios_copy_hw(tty->termios, old_termios);
sierra_send_setup(port); sierra_send_setup(port);
} }
...@@ -404,7 +391,6 @@ static int sierra_tiocmget(struct tty_struct *tty) ...@@ -404,7 +391,6 @@ static int sierra_tiocmget(struct tty_struct *tty)
unsigned int value; unsigned int value;
struct sierra_port_private *portdata; struct sierra_port_private *portdata;
dev_dbg(&port->dev, "%s\n", __func__);
portdata = usb_get_serial_port_data(port); portdata = usb_get_serial_port_data(port);
value = ((portdata->rts_state) ? TIOCM_RTS : 0) | value = ((portdata->rts_state) ? TIOCM_RTS : 0) |
...@@ -441,8 +427,7 @@ static void sierra_release_urb(struct urb *urb) ...@@ -441,8 +427,7 @@ static void sierra_release_urb(struct urb *urb)
{ {
struct usb_serial_port *port; struct usb_serial_port *port;
if (urb) { if (urb) {
port = urb->context; port = urb->context;
dev_dbg(&port->dev, "%s: %p\n", __func__, urb);
kfree(urb->transfer_buffer); kfree(urb->transfer_buffer);
usb_free_urb(urb); usb_free_urb(urb);
} }
...@@ -455,7 +440,6 @@ static void sierra_outdat_callback(struct urb *urb) ...@@ -455,7 +440,6 @@ static void sierra_outdat_callback(struct urb *urb)
struct sierra_intf_private *intfdata; struct sierra_intf_private *intfdata;
int status = urb->status; int status = urb->status;
dev_dbg(&port->dev, "%s - port %d\n", __func__, port->number);
intfdata = port->serial->private; intfdata = port->serial->private;
/* free up the transfer buffer, as usb_free_urb() does not do this */ /* free up the transfer buffer, as usb_free_urb() does not do this */
...@@ -598,8 +582,6 @@ static void sierra_indat_callback(struct urb *urb) ...@@ -598,8 +582,6 @@ static void sierra_indat_callback(struct urb *urb)
endpoint = usb_pipeendpoint(urb->pipe); endpoint = usb_pipeendpoint(urb->pipe);
port = urb->context; port = urb->context;
dev_dbg(&port->dev, "%s: %p\n", __func__, urb);
if (status) { if (status) {
dev_dbg(&port->dev, "%s: nonzero status: %d on" dev_dbg(&port->dev, "%s: nonzero status: %d on"
" endpoint %02x\n", __func__, status, endpoint); " endpoint %02x\n", __func__, status, endpoint);
...@@ -697,8 +679,6 @@ static int sierra_write_room(struct tty_struct *tty) ...@@ -697,8 +679,6 @@ static int sierra_write_room(struct tty_struct *tty)
struct sierra_port_private *portdata = usb_get_serial_port_data(port); struct sierra_port_private *portdata = usb_get_serial_port_data(port);
unsigned long flags; unsigned long flags;
dev_dbg(&port->dev, "%s - port %d\n", __func__, port->number);
/* try to give a good number back based on if we have any free urbs at /* try to give a good number back based on if we have any free urbs at
* this point in time */ * this point in time */
spin_lock_irqsave(&portdata->lock, flags); spin_lock_irqsave(&portdata->lock, flags);
...@@ -805,8 +785,6 @@ static void sierra_close(struct usb_serial_port *port) ...@@ -805,8 +785,6 @@ static void sierra_close(struct usb_serial_port *port)
struct sierra_port_private *portdata; struct sierra_port_private *portdata;
struct sierra_intf_private *intfdata = port->serial->private; struct sierra_intf_private *intfdata = port->serial->private;
dev_dbg(&port->dev, "%s\n", __func__);
portdata = usb_get_serial_port_data(port); portdata = usb_get_serial_port_data(port);
portdata->rts_state = 0; portdata->rts_state = 0;
...@@ -851,8 +829,6 @@ static int sierra_open(struct tty_struct *tty, struct usb_serial_port *port) ...@@ -851,8 +829,6 @@ static int sierra_open(struct tty_struct *tty, struct usb_serial_port *port)
portdata = usb_get_serial_port_data(port); portdata = usb_get_serial_port_data(port);
dev_dbg(&port->dev, "%s\n", __func__);
/* Set some sane defaults */ /* Set some sane defaults */
portdata->rts_state = 1; portdata->rts_state = 1;
portdata->dtr_state = 1; portdata->dtr_state = 1;
...@@ -915,8 +891,6 @@ static int sierra_startup(struct usb_serial *serial) ...@@ -915,8 +891,6 @@ static int sierra_startup(struct usb_serial *serial)
int i; int i;
u8 ifnum; u8 ifnum;
dev_dbg(&serial->dev->dev, "%s\n", __func__);
/* Set Device mode to D0 */ /* Set Device mode to D0 */
sierra_set_power_state(serial->dev, 0x0000); sierra_set_power_state(serial->dev, 0x0000);
...@@ -977,8 +951,6 @@ static void sierra_release(struct usb_serial *serial) ...@@ -977,8 +951,6 @@ static void sierra_release(struct usb_serial *serial)
struct usb_serial_port *port; struct usb_serial_port *port;
struct sierra_port_private *portdata; struct sierra_port_private *portdata;
dev_dbg(&serial->dev->dev, "%s\n", __func__);
for (i = 0; i < serial->num_ports; ++i) { for (i = 0; i < serial->num_ports; ++i) {
port = serial->port[i]; port = serial->port[i];
if (!port) if (!port)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment