Commit 4f0c6412 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: serial: ssu100.c: remove dbg() usage

dbg() was a very old USB-serial-specific macro.
This patch removes it from being used in the
driver and uses dev_dbg() instead.

CC: Alan Stern <stern@rowland.harvard.edu>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8c8e87bc
...@@ -135,7 +135,7 @@ static inline int update_mctrl(struct usb_device *dev, unsigned int set, ...@@ -135,7 +135,7 @@ static inline int update_mctrl(struct usb_device *dev, unsigned int set,
int result; int result;
if (((set | clear) & (TIOCM_DTR | TIOCM_RTS)) == 0) { 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 */ return 0; /* no change */
} }
...@@ -148,7 +148,7 @@ static inline int update_mctrl(struct usb_device *dev, unsigned int set, ...@@ -148,7 +148,7 @@ static inline int update_mctrl(struct usb_device *dev, unsigned int set,
result = ssu100_setregister(dev, 0, UART_MCR, urb_value); result = ssu100_setregister(dev, 0, UART_MCR, urb_value);
if (result < 0) 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; return result;
} }
...@@ -164,7 +164,7 @@ static int ssu100_initdevice(struct usb_device *dev) ...@@ -164,7 +164,7 @@ static int ssu100_initdevice(struct usb_device *dev)
result = ssu100_getdevice(dev, data); result = ssu100_getdevice(dev, data);
if (result < 0) { 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; goto out;
} }
...@@ -172,25 +172,25 @@ static int ssu100_initdevice(struct usb_device *dev) ...@@ -172,25 +172,25 @@ static int ssu100_initdevice(struct usb_device *dev)
result = ssu100_setdevice(dev, data); result = ssu100_setdevice(dev, data);
if (result < 0) { if (result < 0) {
dbg("%s - setdevice failed %i", __func__, result); dev_dbg(&dev->dev, "%s - setdevice failed %i\n", __func__, result);
goto out; goto out;
} }
result = ssu100_control_msg(dev, QT_GET_SET_PREBUF_TRIG_LVL, 128, 0); result = ssu100_control_msg(dev, QT_GET_SET_PREBUF_TRIG_LVL, 128, 0);
if (result < 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; goto out;
} }
result = ssu100_control_msg(dev, QT_SET_ATF, ATC_DISABLED, 0); result = ssu100_control_msg(dev, QT_SET_ATF, ATC_DISABLED, 0);
if (result < 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; goto out;
} }
result = ssu100_getdevice(dev, data); result = ssu100_getdevice(dev, data);
if (result < 0) { 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; goto out;
} }
...@@ -201,7 +201,7 @@ static int ssu100_initdevice(struct usb_device *dev) ...@@ -201,7 +201,7 @@ static int ssu100_initdevice(struct usb_device *dev)
result = ssu100_setdevice(dev, data); result = ssu100_setdevice(dev, data);
if (result < 0) { if (result < 0) {
dbg("%s - setdevice failed %i", __func__, result); dev_dbg(&dev->dev, "%s - setdevice failed %i\n", __func__, result);
goto out; goto out;
} }
...@@ -249,7 +249,7 @@ static void ssu100_set_termios(struct tty_struct *tty, ...@@ -249,7 +249,7 @@ static void ssu100_set_termios(struct tty_struct *tty,
if (!baud) if (!baud)
baud = 9600; 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; divisor = MAX_BAUD_RATE / baud;
...@@ -261,7 +261,7 @@ static void ssu100_set_termios(struct tty_struct *tty, ...@@ -261,7 +261,7 @@ static void ssu100_set_termios(struct tty_struct *tty,
result = ssu100_control_msg(dev, QT_GET_SET_UART, divisor, urb_value); result = ssu100_control_msg(dev, QT_GET_SET_UART, divisor, urb_value);
if (result < 0) if (result < 0)
dbg("%s - set uart failed", __func__); dev_dbg(&port->dev, "%s - set uart failed\n", __func__);
if (cflag & CRTSCTS) if (cflag & CRTSCTS)
result = ssu100_control_msg(dev, QT_HW_FLOW_CONTROL_MASK, result = ssu100_control_msg(dev, QT_HW_FLOW_CONTROL_MASK,
...@@ -270,7 +270,7 @@ static void ssu100_set_termios(struct tty_struct *tty, ...@@ -270,7 +270,7 @@ static void ssu100_set_termios(struct tty_struct *tty,
result = ssu100_control_msg(dev, QT_HW_FLOW_CONTROL_MASK, result = ssu100_control_msg(dev, QT_HW_FLOW_CONTROL_MASK,
0, 0); 0, 0);
if (result < 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)) { if (I_IXOFF(tty) || I_IXON(tty)) {
u16 x = ((u16)(START_CHAR(tty) << 8) | (u16)(STOP_CHAR(tty))); u16 x = ((u16)(START_CHAR(tty) << 8) | (u16)(STOP_CHAR(tty)));
...@@ -282,7 +282,7 @@ static void ssu100_set_termios(struct tty_struct *tty, ...@@ -282,7 +282,7 @@ static void ssu100_set_termios(struct tty_struct *tty,
0, 0); 0, 0);
if (result < 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 +304,7 @@ static int ssu100_open(struct tty_struct *tty, struct usb_serial_port *port) ...@@ -304,7 +304,7 @@ static int ssu100_open(struct tty_struct *tty, struct usb_serial_port *port)
QT_TRANSFER_IN, 0x01, QT_TRANSFER_IN, 0x01,
0, data, 2, 300); 0, data, 2, 300);
if (result < 0) { if (result < 0) {
dbg("%s - open failed %i", __func__, result); dev_dbg(&port->dev, "%s - open failed %i\n", __func__, result);
kfree(data); kfree(data);
return result; return result;
} }
...@@ -319,7 +319,7 @@ static int ssu100_open(struct tty_struct *tty, struct usb_serial_port *port) ...@@ -319,7 +319,7 @@ static int ssu100_open(struct tty_struct *tty, struct usb_serial_port *port)
/* set to 9600 */ /* set to 9600 */
result = ssu100_control_msg(dev, QT_GET_SET_UART, 0x30, 0x0300); result = ssu100_control_msg(dev, QT_GET_SET_UART, 0x30, 0x0300);
if (result < 0) if (result < 0)
dbg("%s - set uart failed", __func__); dev_dbg(&port->dev, "%s - set uart failed\n", __func__);
if (tty) if (tty)
ssu100_set_termios(tty, port, tty->termios); ssu100_set_termios(tty, port, tty->termios);
...@@ -423,7 +423,7 @@ static int ssu100_ioctl(struct tty_struct *tty, ...@@ -423,7 +423,7 @@ static int ssu100_ioctl(struct tty_struct *tty,
{ {
struct usb_serial_port *port = tty->driver_data; 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) { switch (cmd) {
case TIOCGSERIAL: case TIOCGSERIAL:
...@@ -437,7 +437,7 @@ static int ssu100_ioctl(struct tty_struct *tty, ...@@ -437,7 +437,7 @@ static int ssu100_ioctl(struct tty_struct *tty,
break; break;
} }
dbg("%s arg not supported", __func__); dev_dbg(&port->dev, "%s arg not supported\n", __func__);
return -ENOIOCTLCMD; return -ENOIOCTLCMD;
} }
......
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