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/ssu100.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/ssu100.c')
-rw-r--r-- | drivers/usb/serial/ssu100.c | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/drivers/usb/serial/ssu100.c b/drivers/usb/serial/ssu100.c index cf2d30cf7588..015810b3785b 100644 --- a/drivers/usb/serial/ssu100.c +++ b/drivers/usb/serial/ssu100.c @@ -46,8 +46,6 @@ #define FULLPWRBIT 0x00000080 #define NEXT_BOARD_POWER_BIT 0x00000004 -static bool debug; - /* Version Information */ #define DRIVER_VERSION "v0.1" #define DRIVER_DESC "Quatech SSU-100 USB to Serial Driver" @@ -135,7 +133,7 @@ static inline int update_mctrl(struct usb_device *dev, unsigned int set, int result; if (((set | clear) & (TIOCM_DTR | TIOCM_RTS)) == 0) { - dbg("%s - DTR|RTS not being set|cleared", __func__); + dev_dbg(&dev->dev, "%s - DTR|RTS not being set|cleared\n", __func__); return 0; /* no change */ } @@ -148,7 +146,7 @@ static inline int update_mctrl(struct usb_device *dev, unsigned int set, result = ssu100_setregister(dev, 0, UART_MCR, urb_value); if (result < 0) - dbg("%s Error from MODEM_CTRL urb", __func__); + dev_dbg(&dev->dev, "%s Error from MODEM_CTRL urb\n", __func__); return result; } @@ -164,7 +162,7 @@ static int ssu100_initdevice(struct usb_device *dev) result = ssu100_getdevice(dev, data); if (result < 0) { - dbg("%s - get_device failed %i", __func__, result); + dev_dbg(&dev->dev, "%s - get_device failed %i\n", __func__, result); goto out; } @@ -172,25 +170,25 @@ static int ssu100_initdevice(struct usb_device *dev) result = ssu100_setdevice(dev, data); if (result < 0) { - dbg("%s - setdevice failed %i", __func__, result); + dev_dbg(&dev->dev, "%s - setdevice failed %i\n", __func__, result); goto out; } result = ssu100_control_msg(dev, QT_GET_SET_PREBUF_TRIG_LVL, 128, 0); if (result < 0) { - dbg("%s - set prebuffer level failed %i", __func__, result); + dev_dbg(&dev->dev, "%s - set prebuffer level failed %i\n", __func__, result); goto out; } result = ssu100_control_msg(dev, QT_SET_ATF, ATC_DISABLED, 0); if (result < 0) { - dbg("%s - set ATFprebuffer level failed %i", __func__, result); + dev_dbg(&dev->dev, "%s - set ATFprebuffer level failed %i\n", __func__, result); goto out; } result = ssu100_getdevice(dev, data); if (result < 0) { - dbg("%s - get_device failed %i", __func__, result); + dev_dbg(&dev->dev, "%s - get_device failed %i\n", __func__, result); goto out; } @@ -201,7 +199,7 @@ static int ssu100_initdevice(struct usb_device *dev) result = ssu100_setdevice(dev, data); if (result < 0) { - dbg("%s - setdevice failed %i", __func__, result); + dev_dbg(&dev->dev, "%s - setdevice failed %i\n", __func__, result); goto out; } @@ -249,7 +247,7 @@ static void ssu100_set_termios(struct tty_struct *tty, if (!baud) baud = 9600; - dbg("%s - got baud = %d\n", __func__, baud); + dev_dbg(&port->dev, "%s - got baud = %d\n", __func__, baud); divisor = MAX_BAUD_RATE / baud; @@ -261,7 +259,7 @@ static void ssu100_set_termios(struct tty_struct *tty, result = ssu100_control_msg(dev, QT_GET_SET_UART, divisor, urb_value); if (result < 0) - dbg("%s - set uart failed", __func__); + dev_dbg(&port->dev, "%s - set uart failed\n", __func__); if (cflag & CRTSCTS) result = ssu100_control_msg(dev, QT_HW_FLOW_CONTROL_MASK, @@ -270,7 +268,7 @@ static void ssu100_set_termios(struct tty_struct *tty, result = ssu100_control_msg(dev, QT_HW_FLOW_CONTROL_MASK, 0, 0); if (result < 0) - dbg("%s - set HW flow control failed", __func__); + dev_dbg(&port->dev, "%s - set HW flow control failed\n", __func__); if (I_IXOFF(tty) || I_IXON(tty)) { u16 x = ((u16)(START_CHAR(tty) << 8) | (u16)(STOP_CHAR(tty))); @@ -282,7 +280,7 @@ static void ssu100_set_termios(struct tty_struct *tty, 0, 0); if (result < 0) - dbg("%s - set SW flow control failed", __func__); + dev_dbg(&port->dev, "%s - set SW flow control failed\n", __func__); } @@ -304,7 +302,7 @@ static int ssu100_open(struct tty_struct *tty, struct usb_serial_port *port) QT_TRANSFER_IN, 0x01, 0, data, 2, 300); if (result < 0) { - dbg("%s - open failed %i", __func__, result); + dev_dbg(&port->dev, "%s - open failed %i\n", __func__, result); kfree(data); return result; } @@ -319,7 +317,7 @@ static int ssu100_open(struct tty_struct *tty, struct usb_serial_port *port) /* set to 9600 */ result = ssu100_control_msg(dev, QT_GET_SET_UART, 0x30, 0x0300); if (result < 0) - dbg("%s - set uart failed", __func__); + dev_dbg(&port->dev, "%s - set uart failed\n", __func__); if (tty) ssu100_set_termios(tty, port, &tty->termios); @@ -423,7 +421,7 @@ static int ssu100_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: @@ -437,7 +435,7 @@ static int ssu100_ioctl(struct tty_struct *tty, break; } - dbg("%s arg not supported", __func__); + dev_dbg(&port->dev, "%s arg not supported\n", __func__); return -ENOIOCTLCMD; } @@ -668,6 +666,3 @@ module_usb_serial_driver(serial_drivers, id_table); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_LICENSE("GPL"); - -module_param(debug, bool, S_IRUGO | S_IWUSR); -MODULE_PARM_DESC(debug, "Debug enabled or not"); |