diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-01 22:23:01 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-01 22:23:01 +0200 |
commit | d9a807461fc8cc0d6ba589ea0730d139122af012 (patch) | |
tree | 9d8c7a044659d821748dd40718a22557c04e4299 /drivers/usb/serial/console.c | |
parent | Merge tag 'tty-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty (diff) | |
parent | USB: ezusb: move ezusb.c from drivers/usb/serial to drivers/usb/misc (diff) | |
download | linux-d9a807461fc8cc0d6ba589ea0730d139122af012.tar.xz linux-d9a807461fc8cc0d6ba589ea0730d139122af012.zip |
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/console.c')
-rw-r--r-- | drivers/usb/serial/console.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c index 9a564286bfd7..5f3bcd31e204 100644 --- a/drivers/usb/serial/console.c +++ b/drivers/usb/serial/console.c @@ -11,6 +11,8 @@ * */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/kernel.h> #include <linux/init.h> #include <linux/slab.h> @@ -20,8 +22,6 @@ #include <linux/usb.h> #include <linux/usb/serial.h> -static int debug; - struct usbcons_info { int magic; int break_flag; @@ -68,8 +68,6 @@ static int usb_console_setup(struct console *co, char *options) struct tty_struct *tty = NULL; struct ktermios dummy; - dbg("%s", __func__); - if (options) { baud = simple_strtoul(options, NULL, 10); s = options; @@ -113,8 +111,7 @@ static int usb_console_setup(struct console *co, char *options) serial = usb_serial_get_by_index(co->index); if (serial == NULL) { /* no device is connected yet, sorry :( */ - printk(KERN_ERR "No USB device connected to ttyUSB%i\n", - co->index); + pr_err("No USB device connected to ttyUSB%i\n", co->index); return -ENODEV; } @@ -213,10 +210,10 @@ static void usb_console_write(struct console *co, if (count == 0) return; - dbg("%s - port %d, %d byte(s)", __func__, port->number, count); + pr_debug("%s - port %d, %d byte(s)\n", __func__, port->number, count); if (!port->port.console) { - dbg("%s - port not opened", __func__); + pr_debug("%s - port not opened\n", __func__); return; } @@ -237,7 +234,7 @@ static void usb_console_write(struct console *co, retval = serial->type->write(NULL, port, buf, i); else retval = usb_serial_generic_write(NULL, port, buf, i); - dbg("%s - return value : %d", __func__, retval); + pr_debug("%s - return value : %d\n", __func__, retval); if (lf) { /* append CR after LF */ unsigned char cr = 13; @@ -247,7 +244,7 @@ static void usb_console_write(struct console *co, else retval = usb_serial_generic_write(NULL, port, &cr, 1); - dbg("%s - return value : %d", __func__, retval); + pr_debug("%s - return value : %d\n", __func__, retval); } buf += i; count -= i; @@ -284,10 +281,8 @@ void usb_serial_console_disconnect(struct usb_serial *serial) } } -void usb_serial_console_init(int serial_debug, int minor) +void usb_serial_console_init(int minor) { - debug = serial_debug; - if (minor == 0) { /* * Call register_console() if this is the first device plugged @@ -302,7 +297,7 @@ void usb_serial_console_init(int serial_debug, int minor) * register_console). console_write() is called immediately * from register_console iff CON_PRINTBUFFER is set in flags. */ - dbg("registering the USB serial console."); + pr_debug("registering the USB serial console.\n"); register_console(&usbcons); } } |