diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-01 13:23:01 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-01 13:23:01 -0700 |
commit | d9a807461fc8cc0d6ba589ea0730d139122af012 (patch) | |
tree | 9d8c7a044659d821748dd40718a22557c04e4299 /drivers/usb/serial/usb_wwan.c | |
parent | 3498d13b8090c0b0ef911409fbc503a7c4cca6ef (diff) | |
parent | 70c048a238c780c226eb4b115ebaa908cb3b34ec (diff) | |
download | op-kernel-dev-d9a807461fc8cc0d6ba589ea0730d139122af012.zip op-kernel-dev-d9a807461fc8cc0d6ba589ea0730d139122af012.tar.gz |
Merge tag 'usb-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB changes from Greg Kroah-Hartman:
"Here is the big USB pull request for 3.7-rc1
There are lots of gadget driver changes (including copying a bunch of
files into the drivers/staging/ccg/ directory so that the other gadget
drivers can be fixed up properly without breaking that driver), and we
remove the old obsolete ub.c driver from the tree.
There are also the usual XHCI set of updates, and other various driver
changes and updates. We also are trying hard to remove the old dbg()
macro, but the final bits of that removal will be coming in through
the networking tree before we can delete it for good.
All of these patches have been in the linux-next tree.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
Fix up several annoying - but fairly mindless - conflicts due to the
termios structure having moved into the tty device, and often clashing
with dbg -> dev_dbg conversion.
* tag 'usb-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (339 commits)
USB: ezusb: move ezusb.c from drivers/usb/serial to drivers/usb/misc
USB: uas: fix gcc warning
USB: uas: fix locking
USB: Fix race condition when removing host controllers
USB: uas: add locking
USB: uas: fix abort
USB: uas: remove aborted field, replace with status bit.
USB: uas: fix task management
USB: uas: keep track of command urbs
xhci: Intel Panther Point BEI quirk.
powerpc/usb: remove checking PHY_CLK_VALID for UTMI PHY
USB: ftdi_sio: add TIAO USB Multi-Protocol Adapter (TUMPA) support
Revert "usb : Add sysfs files to control port power."
USB: serial: remove vizzini driver
usb: host: xhci: Fix Null pointer dereferencing with 71c731a for non-x86 systems
Increase XHCI suspend timeout to 16ms
USB: ohci-at91: fix null pointer in ohci_hcd_at91_overcurrent_irq
USB: sierra_ms: don't keep unused variable
fsl/usb: Add support for USB controller version 2.4
USB: qcaux: add Pantech vendor class match
...
Diffstat (limited to 'drivers/usb/serial/usb_wwan.c')
-rw-r--r-- | drivers/usb/serial/usb_wwan.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c index 72b678d..e42aa39 100644 --- a/drivers/usb/serial/usb_wwan.c +++ b/drivers/usb/serial/usb_wwan.c @@ -37,8 +37,6 @@ #include <linux/serial.h> #include "usb-wwan.h" -static bool debug; - void usb_wwan_dtr_rts(struct usb_serial_port *port, int on) { struct usb_serial *serial = port->serial; @@ -178,7 +176,7 @@ int usb_wwan_ioctl(struct tty_struct *tty, { struct usb_serial_port *port = tty->driver_data; - dbg("%s cmd 0x%04x", __func__, cmd); + dev_dbg(&port->dev, "%s cmd 0x%04x\n", __func__, cmd); switch (cmd) { case TIOCGSERIAL: @@ -191,7 +189,7 @@ int usb_wwan_ioctl(struct tty_struct *tty, break; } - dbg("%s arg not supported", __func__); + dev_dbg(&port->dev, "%s arg not supported\n", __func__); return -ENOIOCTLCMD; } @@ -212,7 +210,7 @@ int usb_wwan_write(struct tty_struct *tty, struct usb_serial_port *port, portdata = usb_get_serial_port_data(port); intfdata = port->serial->private; - dbg("%s: write (%d chars)", __func__, count); + dev_dbg(&port->dev, "%s: write (%d chars)\n", __func__, count); i = 0; left = count; @@ -229,8 +227,8 @@ int usb_wwan_write(struct tty_struct *tty, struct usb_serial_port *port, usb_unlink_urb(this_urb); continue; } - dbg("%s: endpoint %d buf %d", __func__, - usb_pipeendpoint(this_urb->pipe), i); + dev_dbg(&port->dev, "%s: endpoint %d buf %d\n", __func__, + usb_pipeendpoint(this_urb->pipe), i); err = usb_autopm_get_interface_async(port->serial->interface); if (err < 0) @@ -249,8 +247,9 @@ int usb_wwan_write(struct tty_struct *tty, struct usb_serial_port *port, spin_unlock_irqrestore(&intfdata->susp_lock, flags); err = usb_submit_urb(this_urb, GFP_ATOMIC); if (err) { - dbg("usb_submit_urb %p (write bulk) failed " - "(%d)", this_urb, err); + dev_dbg(&port->dev, + "usb_submit_urb %p (write bulk) failed (%d)\n", + this_urb, err); clear_bit(i, &portdata->out_busy); spin_lock_irqsave(&intfdata->susp_lock, flags); intfdata->in_flight--; @@ -267,7 +266,7 @@ int usb_wwan_write(struct tty_struct *tty, struct usb_serial_port *port, } count -= left; - dbg("%s: wrote (did %d)", __func__, count); + dev_dbg(&port->dev, "%s: wrote (did %d)\n", __func__, count); return count; } EXPORT_SYMBOL(usb_wwan_write); @@ -278,15 +277,17 @@ static void usb_wwan_indat_callback(struct urb *urb) int endpoint; struct usb_serial_port *port; struct tty_struct *tty; + struct device *dev; unsigned char *data = urb->transfer_buffer; int status = urb->status; endpoint = usb_pipeendpoint(urb->pipe); port = urb->context; + dev = &port->dev; if (status) { - dbg("%s: nonzero status: %d on endpoint %02x.", - __func__, status, endpoint); + dev_dbg(dev, "%s: nonzero status: %d on endpoint %02x.\n", + __func__, status, endpoint); } else { tty = tty_port_tty_get(&port->port); if (tty) { @@ -295,7 +296,7 @@ static void usb_wwan_indat_callback(struct urb *urb) urb->actual_length); tty_flip_buffer_push(tty); } else - dbg("%s: empty read urb received", __func__); + dev_dbg(dev, "%s: empty read urb received\n", __func__); tty_kref_put(tty); } @@ -303,8 +304,7 @@ static void usb_wwan_indat_callback(struct urb *urb) err = usb_submit_urb(urb, GFP_ATOMIC); if (err) { if (err != -EPERM) { - printk(KERN_ERR "%s: resubmit read urb failed. " - "(%d)", __func__, err); + dev_err(dev, "%s: resubmit read urb failed. (%d)\n", __func__, err); /* busy also in error unless we are killed */ usb_mark_last_busy(port->serial->dev); } @@ -356,7 +356,7 @@ int usb_wwan_write_room(struct tty_struct *tty) data_len += OUT_BUFLEN; } - dbg("%s: %d", __func__, data_len); + dev_dbg(&port->dev, "%s: %d\n", __func__, data_len); return data_len; } EXPORT_SYMBOL(usb_wwan_write_room); @@ -378,7 +378,7 @@ int usb_wwan_chars_in_buffer(struct tty_struct *tty) if (this_urb && test_bit(i, &portdata->out_busy)) data_len += this_urb->transfer_buffer_length; } - dbg("%s: %d", __func__, data_len); + dev_dbg(&port->dev, "%s: %d\n", __func__, data_len); return data_len; } EXPORT_SYMBOL(usb_wwan_chars_in_buffer); @@ -401,8 +401,8 @@ int usb_wwan_open(struct tty_struct *tty, struct usb_serial_port *port) continue; err = usb_submit_urb(urb, GFP_KERNEL); if (err) { - dbg("%s: submit urb %d failed (%d) %d", - __func__, i, err, urb->transfer_buffer_length); + dev_dbg(&port->dev, "%s: submit urb %d failed (%d) %d\n", + __func__, i, err, urb->transfer_buffer_length); } } @@ -458,7 +458,9 @@ static struct urb *usb_wwan_setup_urb(struct usb_serial *serial, int endpoint, urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */ if (urb == NULL) { - dbg("%s: alloc for endpoint %d failed.", __func__, endpoint); + dev_dbg(&serial->interface->dev, + "%s: alloc for endpoint %d failed.\n", __func__, + endpoint); return NULL; } @@ -522,8 +524,8 @@ int usb_wwan_startup(struct usb_serial *serial) port = serial->port[i]; portdata = kzalloc(sizeof(*portdata), GFP_KERNEL); if (!portdata) { - dbg("%s: kmalloc for usb_wwan_port_private (%d) failed!.", - __func__, i); + dev_dbg(&port->dev, "%s: kmalloc for usb_wwan_port_private (%d) failed!.\n", + __func__, i); return 1; } init_usb_anchor(&portdata->delayed); @@ -548,7 +550,8 @@ int usb_wwan_startup(struct usb_serial *serial) continue; err = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); if (err) - dbg("%s: submit irq_in urb failed %d", __func__, err); + dev_dbg(&port->dev, "%s: submit irq_in urb failed %d\n", + __func__, err); } usb_wwan_setup_urbs(serial); return 0; @@ -683,11 +686,11 @@ int usb_wwan_resume(struct usb_serial *serial) for (i = 0; i < serial->num_ports; i++) { port = serial->port[i]; if (!port->interrupt_in_urb) { - dbg("%s: No interrupt URB for port %d", __func__, i); + dev_dbg(&port->dev, "%s: No interrupt URB for port\n", __func__); continue; } err = usb_submit_urb(port->interrupt_in_urb, GFP_NOIO); - dbg("Submitted interrupt URB for port %d (result %d)", i, err); + dev_dbg(&port->dev, "Submitted interrupt URB for port (result %d)\n", err); if (err < 0) { dev_err(&port->dev, "%s: Error %d for interrupt URB\n", __func__, err); @@ -733,6 +736,3 @@ MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_VERSION(DRIVER_VERSION); MODULE_LICENSE("GPL"); - -module_param(debug, bool, S_IRUGO | S_IWUSR); -MODULE_PARM_DESC(debug, "Debug messages"); |