diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-03 19:44:48 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-03 19:44:48 -0400 |
commit | 64318a52956436bd0d2e910b0c38326b8cda2b8e (patch) | |
tree | 99f404b6ad572843f7ab2e60972b666b1defe73f /drivers/usb | |
parent | 3a3eec0c1f3825398f76fa37c8fcba58c770e0d7 (diff) |
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/serial/sierra.c | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index 8c8bf806f6fa..f298ddaac684 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c | |||
@@ -63,9 +63,7 @@ struct sierra_intf_private { | |||
63 | 63 | ||
64 | static int sierra_set_power_state(struct usb_device *udev, __u16 swiState) | 64 | static int sierra_set_power_state(struct usb_device *udev, __u16 swiState) |
65 | { | 65 | { |
66 | int result; | 66 | return usb_control_msg(udev, usb_sndctrlpipe(udev, 0), |
67 | dev_dbg(&udev->dev, "%s\n", __func__); | ||
68 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), | ||
69 | SWIMS_USB_REQUEST_SetPower, /* __u8 request */ | 67 | SWIMS_USB_REQUEST_SetPower, /* __u8 request */ |
70 | USB_TYPE_VENDOR, /* __u8 request type */ | 68 | USB_TYPE_VENDOR, /* __u8 request type */ |
71 | swiState, /* __u16 value */ | 69 | swiState, /* __u16 value */ |
@@ -73,14 +71,11 @@ static int sierra_set_power_state(struct usb_device *udev, __u16 swiState) | |||
73 | NULL, /* void *data */ | 71 | NULL, /* void *data */ |
74 | 0, /* __u16 size */ | 72 | 0, /* __u16 size */ |
75 | USB_CTRL_SET_TIMEOUT); /* int timeout */ | 73 | USB_CTRL_SET_TIMEOUT); /* int timeout */ |
76 | return result; | ||
77 | } | 74 | } |
78 | 75 | ||
79 | static int sierra_vsc_set_nmea(struct usb_device *udev, __u16 enable) | 76 | static int sierra_vsc_set_nmea(struct usb_device *udev, __u16 enable) |
80 | { | 77 | { |
81 | int result; | 78 | return usb_control_msg(udev, usb_sndctrlpipe(udev, 0), |
82 | dev_dbg(&udev->dev, "%s\n", __func__); | ||
83 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), | ||
84 | SWIMS_USB_REQUEST_SetNmea, /* __u8 request */ | 79 | SWIMS_USB_REQUEST_SetNmea, /* __u8 request */ |
85 | USB_TYPE_VENDOR, /* __u8 request type */ | 80 | USB_TYPE_VENDOR, /* __u8 request type */ |
86 | enable, /* __u16 value */ | 81 | enable, /* __u16 value */ |
@@ -88,7 +83,6 @@ static int sierra_vsc_set_nmea(struct usb_device *udev, __u16 enable) | |||
88 | NULL, /* void *data */ | 83 | NULL, /* void *data */ |
89 | 0, /* __u16 size */ | 84 | 0, /* __u16 size */ |
90 | USB_CTRL_SET_TIMEOUT); /* int timeout */ | 85 | USB_CTRL_SET_TIMEOUT); /* int timeout */ |
91 | return result; | ||
92 | } | 86 | } |
93 | 87 | ||
94 | static int sierra_calc_num_ports(struct usb_serial *serial) | 88 | 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 | int num_ports = 0; | 90 | int num_ports = 0; |
97 | u8 ifnum, numendpoints; | 91 | u8 ifnum, numendpoints; |
98 | 92 | ||
99 | dev_dbg(&serial->dev->dev, "%s\n", __func__); | ||
100 | |||
101 | ifnum = serial->interface->cur_altsetting->desc.bInterfaceNumber; | 93 | ifnum = serial->interface->cur_altsetting->desc.bInterfaceNumber; |
102 | numendpoints = serial->interface->cur_altsetting->desc.bNumEndpoints; | 94 | numendpoints = serial->interface->cur_altsetting->desc.bNumEndpoints; |
103 | 95 | ||
@@ -150,7 +142,6 @@ static int sierra_calc_interface(struct usb_serial *serial) | |||
150 | int interface; | 142 | int interface; |
151 | struct usb_interface *p_interface; | 143 | struct usb_interface *p_interface; |
152 | struct usb_host_interface *p_host_interface; | 144 | struct usb_host_interface *p_host_interface; |
153 | dev_dbg(&serial->dev->dev, "%s\n", __func__); | ||
154 | 145 | ||
155 | /* Get the interface structure pointer from the serial struct */ | 146 | /* Get the interface structure pointer from the serial struct */ |
156 | p_interface = serial->interface; | 147 | p_interface = serial->interface; |
@@ -175,9 +166,8 @@ static int sierra_probe(struct usb_serial *serial, | |||
175 | u8 ifnum; | 166 | u8 ifnum; |
176 | 167 | ||
177 | udev = serial->dev; | 168 | udev = serial->dev; |
178 | dev_dbg(&udev->dev, "%s\n", __func__); | ||
179 | |||
180 | ifnum = sierra_calc_interface(serial); | 169 | ifnum = sierra_calc_interface(serial); |
170 | |||
181 | /* | 171 | /* |
182 | * If this interface supports more than 1 alternate | 172 | * If this interface supports more than 1 alternate |
183 | * select the 2nd one | 173 | * select the 2nd one |
@@ -344,8 +334,6 @@ static int sierra_send_setup(struct usb_serial_port *port) | |||
344 | int do_send = 0; | 334 | int do_send = 0; |
345 | int retval; | 335 | int retval; |
346 | 336 | ||
347 | dev_dbg(&port->dev, "%s\n", __func__); | ||
348 | |||
349 | portdata = usb_get_serial_port_data(port); | 337 | portdata = usb_get_serial_port_data(port); |
350 | 338 | ||
351 | if (portdata->dtr_state) | 339 | if (portdata->dtr_state) |
@@ -393,7 +381,6 @@ static int sierra_send_setup(struct usb_serial_port *port) | |||
393 | static void sierra_set_termios(struct tty_struct *tty, | 381 | static void sierra_set_termios(struct tty_struct *tty, |
394 | struct usb_serial_port *port, struct ktermios *old_termios) | 382 | struct usb_serial_port *port, struct ktermios *old_termios) |
395 | { | 383 | { |
396 | dev_dbg(&port->dev, "%s\n", __func__); | ||
397 | tty_termios_copy_hw(tty->termios, old_termios); | 384 | tty_termios_copy_hw(tty->termios, old_termios); |
398 | sierra_send_setup(port); | 385 | sierra_send_setup(port); |
399 | } | 386 | } |
@@ -404,7 +391,6 @@ static int sierra_tiocmget(struct tty_struct *tty) | |||
404 | unsigned int value; | 391 | unsigned int value; |
405 | struct sierra_port_private *portdata; | 392 | struct sierra_port_private *portdata; |
406 | 393 | ||
407 | dev_dbg(&port->dev, "%s\n", __func__); | ||
408 | portdata = usb_get_serial_port_data(port); | 394 | portdata = usb_get_serial_port_data(port); |
409 | 395 | ||
410 | value = ((portdata->rts_state) ? TIOCM_RTS : 0) | | 396 | value = ((portdata->rts_state) ? TIOCM_RTS : 0) | |
@@ -441,8 +427,7 @@ static void sierra_release_urb(struct urb *urb) | |||
441 | { | 427 | { |
442 | struct usb_serial_port *port; | 428 | struct usb_serial_port *port; |
443 | if (urb) { | 429 | if (urb) { |
444 | port = urb->context; | 430 | port = urb->context; |
445 | dev_dbg(&port->dev, "%s: %p\n", __func__, urb); | ||
446 | kfree(urb->transfer_buffer); | 431 | kfree(urb->transfer_buffer); |
447 | usb_free_urb(urb); | 432 | usb_free_urb(urb); |
448 | } | 433 | } |
@@ -455,7 +440,6 @@ static void sierra_outdat_callback(struct urb *urb) | |||
455 | struct sierra_intf_private *intfdata; | 440 | struct sierra_intf_private *intfdata; |
456 | int status = urb->status; | 441 | int status = urb->status; |
457 | 442 | ||
458 | dev_dbg(&port->dev, "%s - port %d\n", __func__, port->number); | ||
459 | intfdata = port->serial->private; | 443 | intfdata = port->serial->private; |
460 | 444 | ||
461 | /* free up the transfer buffer, as usb_free_urb() does not do this */ | 445 | /* 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 | endpoint = usb_pipeendpoint(urb->pipe); | 582 | endpoint = usb_pipeendpoint(urb->pipe); |
599 | port = urb->context; | 583 | port = urb->context; |
600 | 584 | ||
601 | dev_dbg(&port->dev, "%s: %p\n", __func__, urb); | ||
602 | |||
603 | if (status) { | 585 | if (status) { |
604 | dev_dbg(&port->dev, "%s: nonzero status: %d on" | 586 | dev_dbg(&port->dev, "%s: nonzero status: %d on" |
605 | " endpoint %02x\n", __func__, status, endpoint); | 587 | " endpoint %02x\n", __func__, status, endpoint); |
@@ -697,8 +679,6 @@ static int sierra_write_room(struct tty_struct *tty) | |||
697 | struct sierra_port_private *portdata = usb_get_serial_port_data(port); | 679 | struct sierra_port_private *portdata = usb_get_serial_port_data(port); |
698 | unsigned long flags; | 680 | unsigned long flags; |
699 | 681 | ||
700 | dev_dbg(&port->dev, "%s - port %d\n", __func__, port->number); | ||
701 | |||
702 | /* try to give a good number back based on if we have any free urbs at | 682 | /* try to give a good number back based on if we have any free urbs at |
703 | * this point in time */ | 683 | * this point in time */ |
704 | spin_lock_irqsave(&portdata->lock, flags); | 684 | spin_lock_irqsave(&portdata->lock, flags); |
@@ -805,8 +785,6 @@ static void sierra_close(struct usb_serial_port *port) | |||
805 | struct sierra_port_private *portdata; | 785 | struct sierra_port_private *portdata; |
806 | struct sierra_intf_private *intfdata = port->serial->private; | 786 | struct sierra_intf_private *intfdata = port->serial->private; |
807 | 787 | ||
808 | |||
809 | dev_dbg(&port->dev, "%s\n", __func__); | ||
810 | portdata = usb_get_serial_port_data(port); | 788 | portdata = usb_get_serial_port_data(port); |
811 | 789 | ||
812 | portdata->rts_state = 0; | 790 | portdata->rts_state = 0; |
@@ -851,8 +829,6 @@ static int sierra_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
851 | 829 | ||
852 | portdata = usb_get_serial_port_data(port); | 830 | portdata = usb_get_serial_port_data(port); |
853 | 831 | ||
854 | dev_dbg(&port->dev, "%s\n", __func__); | ||
855 | |||
856 | /* Set some sane defaults */ | 832 | /* Set some sane defaults */ |
857 | portdata->rts_state = 1; | 833 | portdata->rts_state = 1; |
858 | portdata->dtr_state = 1; | 834 | portdata->dtr_state = 1; |
@@ -915,8 +891,6 @@ static int sierra_startup(struct usb_serial *serial) | |||
915 | int i; | 891 | int i; |
916 | u8 ifnum; | 892 | u8 ifnum; |
917 | 893 | ||
918 | dev_dbg(&serial->dev->dev, "%s\n", __func__); | ||
919 | |||
920 | /* Set Device mode to D0 */ | 894 | /* Set Device mode to D0 */ |
921 | sierra_set_power_state(serial->dev, 0x0000); | 895 | sierra_set_power_state(serial->dev, 0x0000); |
922 | 896 | ||
@@ -977,8 +951,6 @@ static void sierra_release(struct usb_serial *serial) | |||
977 | struct usb_serial_port *port; | 951 | struct usb_serial_port *port; |
978 | struct sierra_port_private *portdata; | 952 | struct sierra_port_private *portdata; |
979 | 953 | ||
980 | dev_dbg(&serial->dev->dev, "%s\n", __func__); | ||
981 | |||
982 | for (i = 0; i < serial->num_ports; ++i) { | 954 | for (i = 0; i < serial->num_ports; ++i) { |
983 | port = serial->port[i]; | 955 | port = serial->port[i]; |
984 | if (!port) | 956 | if (!port) |